For our purposes, we intend to use the scanner to decode Code 39 and Code 128/EAN symbologies, though other symbologies supported by the MS-3 units can be enabled if desired. The first application we intend is to use an embedded MS-3 CCD unit to scan barcodes attached to slit masks in the MODS spectrographs we are building for the Large Binocular Telescope.
The serial connection code can work transparently with direct serial connections, or with serial ports connected via a network serial port server, like the Comtrol DeviceMaster servers we use at OSU using TCP/IP protocol sockets. The choice of interface is defined by the port name syntax. See MSOpenPort() for details.
To better interact with Unix serial ports, we disable the factory default preamble text (prepended to all data read from the scanner), and set the postamble to be \r (ASCII 13 = Ctrl+M), which is standard for most serial devices in the Unix world.
Scanner firmware configuration is most easily accomplished using the ESP software for provided by Microscan with a Windows PC. The base configuration commands we use are as follows, configured in this sequence:
Defaults refer to factory default values. We assert these anyway just to be explicit. We also start the configuration by resetting to the factory defaults to ensure that we are not starting from some other, possibly conflicting configuration (i.e., we don't assume we know the past history of a particular scanner).<Zrd> Recover factory defaults <K470,1> Enable Code 39 symbology decoding [default] <K474,1> Enable Code 128/EAN symbology decoding <K140,0> Enable serial point-to-point operation <K200,4> Enable serial trigger mode <K201,X> Serial trigger character is X (ASCII 88) <K220,0,2> No-Decode Timeout interval is 2 seconds [default] <K141,0> Disable read text preamble <K142,1,^M> Read text postamble is Ctrl+M=\r=ASCII 13 <K714,1,NOREAD> Send "NOREAD" on decode timeout [default] <Z> Save these settings for powerup.
Stay tuned...
2004 May 24 - part of a beta-test system evaluating the MS-3 CCD barcode scanner [rwp/osu] 2004 May 31 - separated into its own standalone library [rwp/osu]