D028868 CR1500 CR1100 CR2700 JavaScript Programming Guide User Manual Page 16 of 41
The Code Corporation
12393 South Gateway Park Place, Suite 600, Draper, UT 84020
+1 (801) 495-2200
FAX +1 (801) 495-0280
Example:
var execute = reader.runScript(“codeXml.js”);
reader.configure
The configure method instructs the Code reader to execute a configuration command. It
supersedes readSetting, writeSetting, defaultSettings, and saveSettings. Please review
configuration settings in the CR8200 ICD/CCD, (D026160) for specific details.
Example:
reader.configure(“CDOPPR2”) // Sets maximum 2 barcode decodes per read
reader.beep
The beep method causes the Code reader to beep. The user can call the command with one
(required) to four arguments, which are as follows:
reader.beep(numberOfBeeps, beepOnTime, beepOffTime, delayBeforeBeep).
Example:
// beep 6 times, 250mS on, 1S off each beep, no delay before beep
reader.beep(6, 250, 1000, 0);
// beep once with the default values
reader.beep(1);
reader.vibrate
reader.vibrate can be called without arguments, which gives the default vibrate, or can
be customized by entering values for number of vibration pulses, time on, time off, and the
delay before beginning (in milliseconds).
Example:
// vibrate 3 times, 500mS on, 500mS off, 100mS delay
reader.vibrate(3, 500, 500, 100);
// vibrate once with default values
Reader.vibrate();
reader.indicateGoodRead
This method performs the same indication that a valid decode would produce. The default
behavior is to turn on the green LED for 500mS and beeps once.
Example:
reader.indicateGoodRead();
reader.indicateError
This method turns on the red error LED and performs the same indication that an error would
produce. The default behavior is to beep three times.