Symbol Integrated Scanner
Previous Topic  Next Topic 

Product

Symbol Integrated Scanner

Manufacturer

Standard Satellite Forms component

Website

http://www.satelliteforms.net/

Source code provided

No

Platform

Symbol PalmOS devices, Symbol PocketPC devices, Janam XP PalmOS scanners, Janam XM60 WinCE scanner

Sample project(s)

SymbolBarcode, SymbolFunctionTest, SimpleScannerDemo

Keywords

Symbol, scanner, barcode, ID, UPC, laser, Janam


The Symbol Integrated Scanner control provides complete access to and control over the integrated barcode scanner in Symbol PalmOS and Windows Mobile/PocketPC scanners, Janam XP Palm OS scanners, and the Janam XM60 WinCE scanner.  You can develop industrial grade barcode applications in no time using this extension.


Here is the function description from the extension help:


*********************** EVENTS ***********************


OnClick     > To have this control run a script when a scan is received,

        select 'Run Script' as the control's action. In the editor's

   droplist you will find the OnClick event. Any code placed

   here will fire when a scan is received.


BattLow     > Set the BATTLOW property (see below) to execute the action

   of a control when a Low Battery event is encountered.

   This event is only fired once while the scanner is enabled.

   The scanner will not generate any other events until the scanner

   is disabled and then enabled again.

   When this event occurs, it is best to exit the form and go to

   a non-scanning form. Use Forms(formname).Show from script.

   See also the BATTLOW= property below.


BeforeScan, AfterScan > See Below



************* USER DEFINABLE PROPERTIES *************


The Symbol Control is configured using the following keywords:


AFTERSCAN=  > *This event will only fire when the Process() method is used.

   A Button to execute after scan is received.

   Format: AFTERSCAN=btnAfterScan


BATTLOW=    > Control to execute after a scanBatteryError event.

        If no control is assigned, the default message will appear.

   If a FAIL is asserted in the control's script, the default

   message will not appear.

   If FAIL is not asserted, the default message will appear.

   See also the BattLow event above.

   Format: BATTLOW=btnBattLow


BEEPAFTER=  > *This property is used only when the Process() method is called.

   On,Off -> Beep after scan (takes string)

   Format: BEEPAFTER=On


BEFORESCAN= > *This event will only fire when the Process() method is used.

   A Button to execute before scan input is saved but

   after CtrlAdv and RecordAdv operations are performed.

   Use to save old value before it is changed (so you can

   restore it later)

   Format: BEFORESCAN=btnBefore


CTRLADV=    > *This property is used only when the Process() method is called.

   On or Off Automatically advance to next edit

   control. Will perform RecordAdv action when returning

   to first (Edit1) control. Default Off

   Format: CTRLADV=On


*The EDITxx properties are used only when the Process() method is called.

   EDIT1=      > First Field to enter data into (if AutoAdv = True)

   EDIT2=      > Second  ....

   EDIT3=      > Third   .... etc.

   Format: EDIT1=Edit1


RECORDADV=  > Sets Record Advance Mode. NOTE: Use quotes.

   Off       Never changes record. (Must do manually

   from AfterScan event.)(Default)

   On        Will advance to last record and stop.

   AlwaysCrt Create a new record after last Edit Control.

   CrtAtEnd  Advance thru records, create new after last.

   Format: RECORDADV=On


*SETFOCUS=   > *This property is used only when the Process() method is called.

   On or Off Automatically sets focus to the next edit

   control after scan. (Default Off)

   Format: SETFOCUS=Off


**************** USER METHODS ****************


The Symbol Bar Code Control has the following methods:


About() - Shows information about the control in a dialog box.


BeepAfter(str)- *This property is used only when the Process() method is

        called.

   On,Off Beep after scan.

   See Control's properties for other possible values.


CtrlAdv(str)-      *This property is used only when the Process() method is called.

   On,Off Automatically advance to next control/record.


**DisableScanner()-Disables scanning. Uses less battery power.

   * NOTE: DO NOT CALL OTHER SCANNER METHODS IF SCANNER IS DISABLED

     Doing so will result in a Fatal Error!


**EnableScanner()- Enables scanning. Uses more battery power.

   * NOTE: DO NOT CALL OTHER SCANNER METHODS IF SCANNER IS DISABLED

     Doing so will result in a Fatal Error!

   See the TriggerMode() function to disable scanning.

   RETURNS: true if succeed. Make sure you check this before proceeding.


   If this function fails, return to a non-scanning form.


FollowCursor(str) -*This property is used only when the Process() method is called.

   On,Off Tapping a control makes it next to


GetIndex() -       *This property is used only when the Process() method is called.

   Returns current control's index.


GetScan(timeout) - Returns string. The barcode last scanned. (Set timeout to 0)

   Calling this will read in, and clear the receive buffer.


IsSymbolUnit() - Returns true if device is a Symbol (or Janam) unit.


Process() -        Call from timer event or OnClick event to process automatially.

   The action of this methid is determined by the properties

        of this conrol (see properties above).

   Returns true if a scan was processed.


RecordAdv(str)-    *This property is used only when the Process() method is called.

   Off Stays on same record.

   On Advance through existing records.

   CrtAtEnd Advance thru records, create new after last.

   AlwaysCrt Creates a new record.


ResetCtrls()-      *This property is used only when the Process() method is called.

   Sets index to the 1st control, cancels advance.


ScanAvail() -      For Manual Processing (when Process() is not used).

   Returns integer byte count in rcv. buffer. Do not call unless

   control is enabled. (EnableScanner() method)


SetFocus(str)-     *This property is used only when the Process() method is called.

   On or Off Moves cursor to control after scan.

   Default = Off


SetIndex(int) -    *This property is used only when the Process() method is called.

   Sets the control index. (process will use next edit control

   for the next scan)


SetPort(baud,HwHs,Data,Stop,Parity) - Does nothing. For compatibility with

   Serial Barcode Control, returns true.


SetTermChar(chr(x))- Does nothing. For compatibility with Serial Barcode control.


SkipAdvance(t/f) - *This property is used only when the Process() method is called.

   t/f = True > Process() will stays on same control for next scan.

   t/f = False> does nothing.


StripTerm(t/f) -   Does Nothing. For compatibility with the serial barcode control.


TermRecd() -                For Manual Processing (when Process() is not used).

   Returns False if data is NR, scan failed (a No Read)

        Returns true if scan succeeded.


****************************************************************************

********************* SYMBOL INTEGRATED SCANNER METHODS ********************

****************************************************************************


     ** DO NOT CALL THESE FUNCTIONS UNLESS THE SCANNER IS ENABLED **

                Doing so will result in a fatal error.

             See TriggerMode() function to disable scanning.


Aim(state) -           Aim(true) truns on aiming (laser pointer) mode.


BarcodeLengths(CodeType, LengthType, L1, L2, write) - returns integer

   Write = True, Sets scanner parameters, return 0 if Success

   CodeType: 7=CODABAR, 0=CODE39, 9=CODE93, 5=D25, 6=I2of5, 12=MSI PLESSEY

   LengthType: 0=Any Length, 1=One Length, 2=Two Lengths, 3=Within Range

   L1, L2: length of barcode

   Write = False

   CodeType: see above

   LengthType: 0 = function returns L1, 1 = function returns L2


CheckDigit(CodeType, CheckDigit, write) returns bool

   Write = true, Sets Check Digit setting, returns False if failed

   CodeType: 1=UPCA, 2=UPCE, 13=UPCE1, 0=CODE39, 6=I2of5, 12=MSI PLESSEY

   CheckDigit: 0=No Check Digit, 1=Transmit Check Digit

   Write = false, returns Check digit setting for specified CodeType

    false=No Check Digit, 1= Check Digit enabled


DecoderVersion() -     Returns String of the Decoder Version


GetType() -            After a scan, returns string of the barcode type.


I2of5CheckDigit(ckDigit, write) returns integer

   Write = true, Sets parameter, returns 0 if succeed

   ckDigit: 0=Disable, 1=USS Check Digit, 2 = OPCC Check Digit

   Write = false, returns current parameter setting (ckDigit)


PortDriverVersion() -  Returns String of the Port Driver Version.


RestoreDefaults()-     Restores scanner default settings. <calls ScanCmdParamDefaults())


ScanAngle(angle,write)-Sets the scan angle(angle: 0=Narrow, 1=Wide),

        write=true, angle=0 or 1 Sets scan angle. Returns 0 if success.

          write=false, angle=don't care. Returns the current angle setting.


ScanManagerVersion() - Returns String. The Scan Mgr. Version.



Setbar???(enabled, write) - write=true, enabled=true, enables scanning of

        this type of barcode.

   write= true, enabled=false, disables scanning of this type of barcode.

   write= false, enabled=don't care, returns whether


   Setbar works for the following Barcode types:


        SetbarCODE39(enabled, write)

   SetbarUPCA(enabled, write)

   SetbarUPCE(enabled, write)

   SetbarEAN13(enabled, write)

   SetbarEAN8(enabled, write)

   SetbarD25(enabled, write)

   SetbarI2OF5(enabled, write)

   SetbarCODABAR(enabled, write)

   SetbarCODE128(enabled, write)

   SetbarCODE93(enabled, write)

   SetbarTRIOPTIC(enabled, write)

   SetbarUCC_EAN128(enabled, write)

   SetbarMSI_PLESSEY(enabled, write)

   SetbarUPCE1(enabled, write)

   SetbarBOOKLAND_EAN(enabled, write)

   SetbarISBT128(enabled, write)

   SetbarCOUPON(enabled, write)

   SetbarPDF417(enabled, write)


GetTypeSettings()  - Returns a number. Each binary bit represents

   a barcode type (see below).

SetTypeSettings(num)-Enables a barcode type if the bit is set (see

   GetSettings() above). Add the following numbers together to enable

   scanning of particular barcode types.


        CODE39       1st bit= 1

        UPCA         2nd bit = 2

        UPCE         3rd bit = 4

        EAN13        4th bit = 8

        EAN8         5th bit = 16

        D25          6th bit = 32

        I2OF5        7th bit = 64

        CODABAR      8th bit = 128

        CODE128      9th bit = 256

        CODE93       10th bit = 512

        TRIOPTIC     11th bit = 1024

        UCC_EAN128   12th bit = 2048

        MSI_PLESSEY  13th bit = 4096

        UPCE1        14th bit = 8192

        not used     15th bit = 16384

        BOOKLAND_EAN 16th bit = 32768

        ISBT128      17th bit = 65536

        COUPON       18th bit = 131072

       PDF417       19th bit = 262144


    e.x. To enable Code39 and UPCE: 1+4 = 5 ... SetTypeSettings(5)

    This is much quicker than setting all the barcode types individually.


StartDecode(on)-   Starts/Stops scanning.

        on=true, turns laser on & starts scanning.

   on=false, turns laser off, stops scanning.


bool TriggerMode(mode)- Sets scan triggering mode mode:

    0=none (Disables scanner)

    1=Host

    2=Level

    3=Pulse

   Host is the default mode. See Symbol documentation for

   an explanation of these modes.

   Set mode to 0 to disable scanning but leave library open

   to call other Symbol Scanner functions.


===========================================================================

                        SYMBOL ADVANCED FUNCTIONS (V1.0)

===========================================================================


        For more information on these advanced functions, consult your Symbol

        Scanner Integration Guide.


int AimDuration(time, write)

        wite = true, Set Aim Duration. Returns 0 if succeed.

        write = false, reads Aim Duration.

        time  = 5-99 in tenths of a second.


bool BidirectionalRedundancy(enable, write)

        write= true, returns True if successful.

        enable = true enables redundancy,

        enable = false disables redundancy.

        write= false, returns current setting.


bool Code32Prefix(enable, write)

        write = true sets this parameter, returns true if succeed.

        write = false, returns current setting

        (Enabled = true)


bool Code39CheckDigitVer(enable, write)

        write = true sets this parameter, returns true if succeed.

        write = false, returns current setting

        (Enabled = true)


bool Code39FullAscii(enable, write)

        write = true sets this parameter, returns true if succeed.

        write = false, returns current setting

        (Enabled = true)


bool ClsiEditing(enable, write)

        write = true sets this parameter, returns true if succeed.

        write = false, returns current setting

        (Enabled = true)


int DecodeLedOnTime(time, write)

        write = true, Set Decode LED on time. Returns 0 if write succeed.

        write = false, reads Decode LED on time.

        time = 10-1000 in tenths of a second.


int DecodeUpcEanRedun(redun, write)

        write = ture, sets this parameter and returns 0 if succeed.

        write = false, returns value of this setting.

        redun = value from 2 to 20.


int DecodeUpcEanSupp(mode, write)

        write = true, sets value and returns 0 if succeed.

        write = false returns parameter setting.

        mode:

                0, Ignore Supplementals

                1, Decode Supplementals

                2, Autodiscriminate Supplementals


bool EanZeroExtend(enable, write)

        write = true, sets this parameter and returns true if succeed.

        write = false, returns the value.

        enable= true/false determines value of this setting when

        write = true.


int HostSerResponseTimeout(time, write)

        write = true, sets parameter and returns 0 of succeed.

        write = false, returns current setting in tenths of a second.

        time = 0-99 in tenths of a second.


int LaserOnTime(time, write)

        write = true, Set laser on time. Returns 0 if write succeed.

        write = false, reads laser on time.

        5-99 in tenths of a second.


bool LedOn(on)

        Turns green scan LED on and off.

        on = true, Turns LED on.

        on = false, Turns LED off.


int LinCodeTypeSecurLevel(level, write)

        write = true, sets value.

        write = false, reads value. Write returns 0 if succeed.

        level:

                1, Security Level 1

                2, Security level 2

                3, Security Level 3

                4, Security Level 4


int MsiPlesseyCkDigits(num, write)

        write = true sets this parameter, returns 0 if succeed.

        write = false, returns current setting.

        num =

                1 = One check Digit

                2 = Two Check Digits


int MsiPlesseyCkDigitAlg(alg, write)

        write = true sets this parameter, returns 0 if succeed.

        write = false, returns current setting of algorythm parameter.

        algorythm =

                10 = Mod10 Mod10

                11 = Mod 10 Mod11


bool NotisEditing(enable, Write)

        write = true sets this parameter, returns true if succeed.

        write = false, returns current setting

        (Enabled = true)


int PrefixSuffixValues(prefix, suffix1, suffix2, write)

        write = true, sets value and returns 0 if succeed.

        write = false\nif prefix = 0, returns prefix setting,

                if prefix = 1, returns suffix1 setting,

                if prefix = 2, returns suffix2 setting.


bool SetConvert(Conversion, enable, write)

        write = true sets parameter, returns true if succeed.

        write = false, returns true if conversion is enabled.

                Specify conversion with the conversion parameter.

        enable = true, enables conversion.

        enable = false, disables conversion.

        conversion:

                0 > UPCE to UPCA

                1 > UPCE1 to UPCA

                2 > EAN8 to EAN13

                3 > CODE39 to CODE32

                4 > I2 of 5 to EAN13


int TransmitCodeIDChar(code, write)

        write = true, sets parameter. Returns 0 if succeed.

        write = false, returns surrent setting.

        code =

                0, Disable

                1, Symbol Code ID Character

                2, Aim Code ID Character


int TransmissionFormat(format, write)

        write = true, Sets value and returns 0 if succeed.

        write = false, returns format setting.

        Format:

                0, Data as is.

                1, Data Suffix 1

                2, data Suffix 2

                3, Data Suffix 1, Suffix 2

                4, Prefix Data

                5, Prefix Data Suffix 1

                6, Prefix Data Suffix 2

                7, Prefix Data Suffix 1, Suffix 2


int UpcEanSecurLevel(level, write)

        write = true, sets parameter and returns 0 if succeed.

        write = false, returns setting of level parameter.

        Level =

                0, Security Level 0

                1, Security Level 1

                2, Security Level 2

                3, Security Level 3


int UpcPreamble(type, preamble, write)

        write = true, sets this parameter and returns 0 if succeed.

        write = false, returns value of preamble setting for selected

                type.

        Type:

                0, bar UPCA

                1, bar UPCE

                2, bar UPCE1

        Preamble:

                0, No Preamble

                1, System Character

                2, System Character Country Code



DocID: 10132  DocDate: 2008-05-27