Earlier versions of this printer were branded as the Psion Comms Printer by Psion Inc., the American business arm of Psion. It seems likely that they dropped the brand support for this printer once the standard Psion II Printer became more available.
|Part Numbers:||76710xx (24 col.)
76714xx (42 col.)
|Mag Card Option:||Add R1 for Track 2
Add R2 for Tracks 1 & 2
Add R3 for Tracks 2 & 3
7A060018 - 3/94-R2
EXTECH INSTRUMENTS CORPORATION warrants this instrument to be free of defects in parts and workmanship for a period of 1 year (90 days on battery pack and printhead) from date of shipment.
The sender is responsible for shipping charges, freight, insurance and proper packaging to prevent damage in transit.
This warranty does not apply to defects resulting from action of the user such as misuse, improper wiring, operation outside of specification, improper maintenance or repair, or unauthorized modification. Extech specifically disclaims any implied warranties of merchantibility or fitness for a specific purpose and will not be liable for any direct, indirect, special, incidental or consequential damages. Extech's total liability is limited to the repair or replacement of the product. The warranty set forth above is inclusive and no other warranty, whether written or oral, is expressed or implied.
If it should become necessary to return the instrument for service during or beyond the warranty period, then contact the Customer Service Department, Extech Instruments Corporation, 335 Bear Hill Road, Waltham, MA 02154. (6l7) 890-7440. A Return Authorization (RA) number must he issued before any product is returned to Extech. Your repaired unit will be returned via UPS Ground service. However, if a faster shipping method is desired please inform Customer Service at the time the RA is issued, and you will be billed for the additional freight charges.
|1.2||Installing and Charging Battery||4|
|3.1||Special Function Keys||6|
|3.2||Printing from the COMMS Menu||7|
|3.3||Printing from the Menu functions||8|
|4.3.1||End Of Text Character||11|
|4.4||Printer Command Set||16|
|4.5||Printer Character Set||18|
|5.0||BAR CODE PORT & OPTIONS||19|
|5.1||Bar Code Reader||19|
|5.1.1||Connection and use||19|
|5.1.2||The BAR$: Function||20|
|5.2||Magnetic Card Reader (Track 2 only)||26|
|5.2.2||Possible Errors Returned||27|
|5.2.3||Example OPL Procedure||27|
|5.3||Magnetic Card Reader Option (Track 1, 2 or 3)||30|
|5.3.1||Reader Control Code||30|
|Appendix A||ASCII Control Characters||34|
|Appendix B||The Comms Link Interface||35|
|Appendix C||Example Programs||36|
|Appendix D||Parity, Data Bits, & Stop||41|
|Appendix E||Trouble Shooting Guide||43|
This section is intended to let you get up and running quickly, so please read it carefully! If you need more information on any item, see the relevant section of this manual.
IMPORTANT NOTE: Operate the printer only with the battery and battery cover in place.
IMPORTANT NOTE: Be sure to turn off the printer and/or parts when not in use. This will maximize the battery life between recharges.
After installing the printer on to the Organiser, press the ON button twice. Two additional menu items will appear. They are COMMS and DEVICE. COMMS will be discussed in another chapter. We will concern ourselves with DEVICE.
The Comms Printer plugs into the top of the Organiser. Before attempting to attach the Comms Printer to the Organiser, slide open the door at the top of the Organiser. See Figure 3.
After removing the printer from the packaging, slide it over the top of the Organiser until the Organiser display shows through the window of the printer. See Figure 4.
Do not install Comms Printer to Organiser with AC adaptor plugged in as damage to the Organiser may occur.
See Figure 1.
The Comms Printer is capable of delivering about one to two hours of continuous printing on a full charge. Remove the battery from the box and install it into the compartment at the back of the printer (see Figure 5). To charge battery, plug the AC or DC adaptor into the socket (an amber light should show). The Comms Printer should be charged overnight prior to its first use. Always charge the unit 10 to 14 hours or overnight to obtain a full charge. NiCad batteries have an inherent "memory." Unless fully discharged and charged each time, the battery packs capacity will become limited.
The Comms Printer may be operated from an AC or DC adaptor; however, the battery MUST be installed first.
IMPORTANT - Make sure that the adaptor is a 9V regulated 1 AMP Extech Adaptor.
Remove the Paper Cover by pressing at the point shown in Figure 6A. Lift the cover off by tilting it towards the Organiser as shown in Figure 6B.
With the Comms Printer installed onto the Organiser, press Device and Select Printer to turn the printer on. The LED should change color. If it does not, battery may be discharged. Plug in AC or DC adaptor. Feed the paper into the slot shown in Figure 7. Press the red Paper Feed button until the paper comes out through the top of the print head and behind the exposed ribbon. Drop paper roll into paper guide (See Figure 8). Install the window cover and snap it into place. To turn printer off and conserve battery power press O (Off) key on Organiser or select Device, Printer, None.
Remove Paper Cover as described in section l.3. Push down on ribbon at location a shown in Figure 9. When end of ribbon pops up, remove ribbon by grabbing both ends and lifting up. Insert ribbon in place and press down at locations a and f until ribbon is firmly in place. With your thumb rotate the wheel at location f clockwise one full rum to insure that the ribbon is in place. Paper must pass through exposed ribbon and ribbon case in order to print.
DEVICE allows you to manually select the printer or serial port. Move the cursor to DEVICE and press EXE. The following menu will appear:
PORT PRINTER NONE
Selecting PORT will power up the serial port and direct the data stream from the Organiser to the female DB-9 connector located on the left side of the Comms Printer. Selecting PRINTER will power up the printer and feed data likewise. Notice that the POWER light will glow green when printer or port is selected.
If, after selecting PRINTER, you reenter the device menu and select PORT, the printer will remain powered although the data stream will be directed to the serial port. Selecting NONE will power down and de-select all devices. If printer is on and you want to power down the printer and turn on the serial port. ENTER the DEVICE menu twice, once to select NONE and again to select PORT.
NOTE: These functions are also accessible through OPL. See Chapter 4 for details.
NiCad batteries work best when fully charged and then fully discharged. Moreover, we suggest that upon initial use that you fully charge the battery overnight to insure a full charge. The batteries will give the longest charge if you run them until the printer no longer functions and then re-charge overnight.
The Extech Comms Printer II may be operated in three different ways; by keyboard commands, the Organiser's built-in menu functions, or an OPL applications program. The keyboard commands are discussed below in section 3.1. The use of the COMMS menu to print is discussed in section 3.2. Printing from menu functions is covered in section 3.3. Section 4.0 covers the operation of the printer using an OPL applications program.
The Comms Printer adds special function keys to the Organiser keyboard. These functions are accessed by pressing a combination of two keys.
|Paper feed 5 lines||SHIFT+SPACE|
|Halt Printer (Control-V)||← V|
|Resume Printing (Control-W)||← W|
|Clear Buffer (Control-X)||← X|
NOTE: These function keys will operate when the Organiser is in any of the top level menus. They are inoperative while running an OPL procedure, while using the COMMS menu, or when using the BAR$ Language Extension in OPL, However, from OPL, you can achieve the same effects by trapping key presses and sending control characters to the printer.
EXAMPLE: Suppose you want to print a database file from the Organiser menu. If using a LZ, select XFILES from the top level menu. Select OPEN filename (i.e. OPEN A:MAIN) then PRINT to begin printing. Suppose you need to print only the first three records:
The COMMS function gives you a lot of flexibility in controlling the Comms Printer. In this mode, you may send any ASCII character you wish to the printer. You can easily combine text and commands using the TERM function. The TERM function emulates a computer terminal. It gives you access to most of the ASCII character set through various combinations of key presses.
The COMMS menu is one way to print out files and programs on the Organiser, either as an alternative to using another menu function (such as XFILES on an Organiser II Model LZ) or when there is no menu function on your model of Organiser to access a particular file (e.g. the Organiser II Model XP).
To print out a file from COMMS, select PRINTER from the DEVICE menu (see section 1.5) to turn the printer ON. The printer can now be used from the COMMS menu to print out files and OPL program source code listings.
Select COMMS from the top-level menu, then select SETUP. Press MODE, then "R", then "Y" to reset the communications parameters to those of the Comms Printer. You may now TRANSMIT files to the printer. This will cause the printer to list the file or program. For exact details on the proper syntax and usage, see Section 5.2.2 on Transferring a file.
If you wish, you may also use TERM mode to print out characters as soon as they are typed. Each time the EXE key is pressed, it will print the last line of text entered. All printer commands are available to you when using TERM. See section 3.1 for details on these commands.
NOTE: You are responsible for controlling printer power when using this method of operation. Select DEVICE, then PRINTER to turn it on before printing. Be sure to turn off the printer when done, using the DEVICE menu and selecting NONE. You must remember to turn the printer ON before printing and OFF afterwards; otherwise, you will discharge the printer battery.
A convenient program for shutting printer off is as follows (we suggest you add this to your top level menu):
Select PRINTER from the DEVICE menu (see section 1.5) to turn the printer ON. The printer can now be used from any of the Organiser's built-in menu functions which support printing, such as DIARY or NOTES. While using these functions, you may use any of the special function keys (see section 3.1).
On the Model LZ and LZ64, the following functions support printing:
Refer to the Organiser Operating Manual for details on how to access the PRINT option from each of these functions.
On Model XP, only the FROG function supports a printer. Select LIST to print out a program stored on a device. This is explained in the XP Operating Manual. Other files may be printed out from the XP, but this must be done using the COMMS function, as described above in section 3.2.
Like any battery-powered device, the Comms Primer has a finite battery life. The maximum usage between recharges will be obtained when some very simple rules are followed:
It is important to understand the interaction of the Organiser's power supply and that of the printer. Some of the Comms Printer's internal circuitry (the Comms Link portion) is powered by the Organiser's internal 9 volt battery. The drain is steady and measurable when the Comms Link is in use. The Printer section of the Comms Printer handles all the heavy-duty power control for the printer battery and printhead. This is entirely separate from the Organiser and the Comms Link interface circuitry.
In summary, the Comms Link circuitry is powered up whenever a Device, the COMMS menu, BAR$ function, or SWIPE$ function is in use. The printhead uses no power at all from the Organiser's battery. When no devices are selected, the only drain on the Organisers battery is negligable (on the order of a few microamperes). Be sure that only the devices you need are powered; this will result in maximum battery life.
A printer self-test may be initiated by first holding down the paper feed button and then selecting PRINTER. While performing the self-test. the printer will print its set up setting, version of firmware, and various characters across the paper. The printer will continuously print until DEVICE NONE is selected.
Since the communications parameters for the printer are fixed, use the following command:
The Comms Printer loads an OPL extension called XCOMM:(x%) into the Organiser. XCOMM works as follows:
|XCOMM:(0)||Printer power on and printer selected|
|XCOMM:(1)||Comms Link powered and selected|
|XCOMM:(3)||Printer power off|
|XCOMM:(7)||All devices off|
It is recommended that, following the XCOMM:(0) command, that the Organiser allow time for the printer to power up before sending data to be printed. The following procedure gives an example.
PRINTER: XCOMM:(0) :REM PRINTER ON PAUSE 5 :REM ALLOW PRINTER TO STABILIZE LPRINT "HELLO THERE" :REM PRINT MESSAGE
The data stream is directed to the last device called for in your applications program. Therefore, take note of the following program to shut off the printer and set data stream to comms link.
STREAM: LocAL A$(2) XCOMM:(1) :REM SELECT COMMS LINK LPRINT "COMMS LINK SELECTED" XCOMM:(0) REM PRINTER POWER ON, DATA STREAM TO PRINTER PAUSE 5 REM ALLOW TIME EOR PRINTER TO STABILIZE LPRINT "PRINTER POWER ON" A$=LINPUT$:(0) :REM CLEAR INPUT BUFFER A$=LINPUT$:(2) :REM WAIT FOR ^D FROM PRINTER IF A$=CHR$(4) XCOMM:(7) :REM ALL DEVICES OFF STOP :REM EXIT PROGRAM ELSE :ENDIF XCOMM:(3) :REM PRINTER POWER OFF REM DATA STREAM CONNECTED TO NOTHING NOW :REM SET DATA STREAM BACK TO COMMS LINK XCOMM:(1) LPRINT "COMMS LINK SELECTED AGAIN" XCOMM:(7) :REM ALL DEVICES OFF
Note that, after using XCOMM:(3) lo shut the printer off, you must execute XCOMM:(1) again to set data stream back to comms link.
The printer has a set of commands which provide control of printer functions. The printer also provides response commands informing the Organiser of printer status.
The printer sends an EOT [^D or CHRS(4),] when the buffer is empty. This is used to tell the Organiser that the printer is done so the host can shut the printer off. Assume that the buffer is empty and the printer is idle. When a character string is received by the printer, it sends a ^D when printing is complete. The following OPL procedure will respond to the ^D at the beginning of printing and shut off the printer before printing is complete.
EOT: LOCAL A$(1),I% XCOMM:(0) :REM PRINTER ON PAUSE 5 REM PRINT CHARACTER SET D0 LPRINT CHR$(I%); I%=I%+1 UNTIL i%=256 A$=LINPUT$:(l) :REM GET RESPONSE CHARACTER IF A$=CHR$(4) :REM LOOK FOR EOT XCOMM:(7) :REM PRINTER OFF ELSE :ENDIF
In order to have the Organiser turn off the printer at the end of printing, the applications program must look for ^D before shutting down the printer. The following OPL procedure does this:
CTRLD: LOCAL A$(2),I% I%=32 XCOMM:(0) :REM PRINTER ON PAUSE 5 REM PRINT CHARACTER SET DO LPRINT CHR$(I%); I%=I%+1 UNTIL I%=256 LPRINT LPRINT A$=LINPUT$:(0) A$=LINPUT$:(1) :REM LOOK FOR ^D ONCE IF A$=CHR$(4) GOTO OUT:: ELSE PRINT "ERROR" ;REM INFORM USER OF ERROR PAUSE 20 ENDIF OUT:: PRINT "PRINTER DONE" XCOMM:(7) :REM PRINTER OFF
The program needs to look for the EOT at the end of printing before shutting the printer off.
Alternatively, send ^V [CHRS(22)] as the first character, then send all the text followed by ^W [CHRS(23)]. Doing so will cause the printer to halt until all text is loaded into the buffer. The ^W will then start the printing. The following is an example:
CTRLV: LOCAL A$(1) XCOMM:(0) :REM PRINTER ON :PAUSE 5 LPRINT CHR$(22); :REM HALT COMMAND, CONTROL-V LPRINT "COMMS PRINTER" LPRINT "EXTECH DATA SYSTEMS" LPRINT CHR$(23); :REM START WITH CONTROL-W A$=LINPUT$:(0) A$=LINPUT$:(1) IF A$=CHR$(4) :REM LOOK FOR CONTROL-D (EOT) XCOMM:(7) :REM PRINTER OFF ELSE :ENDIF REM IF NOT CONTROL-D, DO NOT SHUT OFF
As you can see, there are various ways to confront the EOT character. The advantage of using control-V and control-W is that, when sending a long string to be printed it is possible that the print buffer will empty in the middle of printing. If your applications program is looking for the EOT, it is possible for one to be received prematurely, causing the program to shut off the printer. Sending control-V at the beginning of the string and control-W at the end will eliminate this situation. However, it takes some time for a large file to pass from the Organiser to the print buffer, causing a delay in printing.
The printer can be set to print bit mapped graphics. Graphics are printed one dot line at a time by feeding the printer a hex code which corresponds to a dot pattern for 6 dots. Graphics mode is initiated by sending ESC+G (→ A, then G in Comms Link TERM mode) followed by a line terminator such as CR-LF. The printer will now be in graphics mode. Sending a line terminator will now cause the printer to advance the paper by one dot line instead of one character line.
To program a dot line, you must select which dots on each line to print. Dots are grouped in batches of six dots. Each batch of six dots is coded in a hex format from 3F to 7E. (See Table 1).
The following chart outlines the dot patterns and HEX codes.
Therefore, each group of six dots must have its own dot code.
would look like
.. . . ... ....... . . . [ 74 ][ 53 ][ 61 ][ 3F ][ 55 ]
To print a line of all dots, all the way across the sheet use the following OPL procedure:
LINE: REM PROGRAM TO PRINT ONE DOT LINE LOCAL I% I%=0 LPRINT CHR$(27)+"G" :REM SET GRAPHICS MODE DO LPRINT CHR$($3F); :REM PRINT ALL 6 DOTS I%=I%+1 UNTIL I%=42 :REM USE "24" FOR 24 COLUMN HEAD LPRINT LPRINT CHR$(27)+"A" :REM RETURN TO ASCII MODE
To return to text (ASCII) mode, send CHR$(27)+"A" followed by CR-LF. Note: you may use the hex equivalent for the ESC code, i.e. CHR$($1B) equivalent to CHR$(27).
Note: Be sure to exit Graphics Mode and return to Text Mode when done. Failure to do so will keep the printfeed gear engaged and will result in printhead damage when paper is pulled forward or backwards. This will VOID the printer warranty.
|EOT||D||04||04||Sent once by printer to host indicating buffer is empty.|
|BS||H||08||08||Back Space. Remove previous character in printer buffer.|
|HT||I||09||09||Horizontal tab. Tab to 5,9,13,17,21,25,29,33,37 or beginning of next line.|
|VT||K||0B||11||Advance 5 lines.|
|FF||L||0C||12||Form Feed. Advance 11 lines.|
NOTE: Control-K and control-L must be sent twice for 5 and 11 line feeds, respectively For example, one ^K will advance the paper 3 lines and the next ^K will advance 2 line. For ^L, first is 6 lines, second is 5 lines. Using the new special function keys from the printer menus will actually send ^K twice, thereby guaranteeing 5 line feeds every time. (See section 3.1)
|CR||M||0D||13||Carriage return. Advance to next line.|
|SO||N||0E||14||Shift out. Begin double width print.|
|XON||Q||11||17||Printer to Host: ready to receive. Host to printer: host is ready to receive.|
|AUX ON||R||12||18||Primer to host: printer is on line.|
|XOFF||S||13||19||Primer to host: not ready to receive. Host to printer, not ready to receive.|
|T||14||20||Return to normal print.|
|AUX OFF||U||15||21||Printer to host: printer is off line.|
|HOLD||V||16||22||Hold printer. Do not clear contents of buffer. Buffer will accept characters at this time.|
|RELEASE||W||17||23||Resume printing after hold.|
|CLEAR BUFFER||X||18||24||Clear contents of buffer printer responds with ^D unless ^V was sent prior to ^X. Then, printer responds with ^D only after ^W has been sent following ^V and ^X.|
|ESC||1B||27||ESCAPE. Used to initiate graphics mode. ESC+G - Start graphic mode. ESC+A - Exit graphic mode, return to ASCII mode.|
|1C||28||Begin double high print.|
|1D||29||End double high print.|
|0E+1C||14+28||Begin double high and wide print.|
DOUBLE: LPRINT CHR$(14)+CHR$(28)+"ABCDE" REM PRINT "ABCDE" DOUBLE HIGH AND WIDE LPRINT CHR$($E)+CHR$($1C)+"ABCDE" REM SAME AS ABOVE
Note: normal font is re-instated following either ^T (14 hex or 20 decimal) OR a line terminator such as CR-LF.
The following table lists the entire printable character set, starting at ASCII code 32 (SPACE).
The built-in Bar Code Reader port turns the Organiser into a powerful and versatile data capture unit. It will read a wide variety of bar code types. quickly and efficiently.
The Bar Code Port adds a new function to OPL (Organiser programming language). When this function is called, a successful read will return a bar code string to OPL, for storing or displaying. There are two example OPL programs at the back of this section which will enable you to begin reading bar codes straight away.
This Bar Code Reader software supports several bar code types, and includes a 'low current' mode to considerably increase battery life. This section contains all the specific details you need to use your Bar Code Reader. If you have any more general problems, refer to your Organiser II operating manual.
The Bar Code function cannot be used with the Organiser Model CM.
The Bar Code Reader port consists of a 9-pin "D"-shell male connector: This is an industry-standard bar code port. You may attach a wand scanner, CCD scanner, or Laser (solid state type) to this port. Consult your dealer for compatibility with a particular device.
|Bar Code Connections|
To use the Bar Code Reader, first switch off the Organiser and plug the Comms Printer/Modem into the peripheral port at the top. The unit will only go in one way.
Turn the Organiser on and when you see the main menu displayed, press ON/CLEAR again. This loads the Bar Code Reader software from inside the printer into the Organiser. The Bar Code Reader is now ready for use. The software occupies around 1K of the Organiser's internal memory, so if the memory is already nearly full, an OUT OF MEMORY message may be displayed. If this happens, you must free some memory by deleting any non-vital files, records, programs or diary entries, then try loading the Bar Code Reader software again.
When you load the Bar Code Reader software, a new function, BAR$:, is automatically added to OPL.
Note: the Bar Code Reader acts as an extra drain on the Organiser's battery, so allowance should be made for the slightly shorter battery life when the Bar Code Reader is in heavy use. To reduce the effects of this problem:
When the Bar Code Reader software is loaded. the BAR$: function is added to OPL. Here is an example of how an OPL program might use the function:
In this example, three integer parameters (TYPE% MODE% and OPTIONS%) are passed to the BAR$: function, and the string which it returns is stored in a string variable B$.
TYPE%: defines which types of bar code are to be read
MODE%: defines when the bar code reader is to report back to the Organiser
OPTIONS%: activates extra features (optional: allows compatibility with the previous version of the Bar Code Reader)
The TYPE parameter tells the wand which types of bar codes are to be read.
Just one type may be allowed, or any combination of types, so that certain types can be excluded if, say, different product categories have different types of bar code. If you specify more than one type of code, the software will automatically recognize the type and then decode it accordingly. If the bar code encountered is not one of the types you have specified then it will be ignored, and it will not produce a successful read.
To find out which value to give the TYPE parameter to get the wand to read only the types of codes you wish, simply add together the values in the table below which correspond to the bar code types you wish to allow.
|Value||Bar Code Type||ID CHARACTER|
So for example, if you wish to allow EAN and ITF bar code types to be read, the value for the TYPE parameter should be 9, produced by adding 1 (for EAN) and 8 (for ITF). It is advisable to allow the wand to read only those types of bar code needed in your application; this will minimize the possibility of error. If you use an illegal value (such as 0) for the TYPE parameter, a BAD DEVICE CALL error message will be displayed.
This parameter specifies the conditions under which BAR$: should return back to the OPL program. The possible values of this integer parameter are shown in the table below:
|0||wait until a good read is made|
|-1||wait for a good read or a key press|
|>0||wait for a good read or for this number of twentieths of a second|
|<-1||wait for a good read or a key press or for this (positive) number of twentieths of a second|
Example, if a MODE parameter of -200 is used, the BAR$: function will return a barcode string as soon as a good read occurs within ten seconds. But if no good read occurs inside the ten seconds, or if a key is pressed before a read takes place, a null string is returned.
Note: If a key is pressed, the ASCII code for that key will be retained in the keyboard buffer. A subsequent use of the GET function will return that ASCII value.
The third parameter to the BAR$: function, the OPTIONS parameter, may be used to specify any or all of the options in the table below. If you do not wish to use any of these options, you can omit the OPTIONS parameter completely from the BAR$: function.
|1||use low current mode|
|2||return TELEPEN codes in numeric format, not ASCII (checksum excepted)|
|4||use 2 checksum digits for MODIFIED PLESSEY, not 1|
|8||use 1 checksum digit for CODE39 (modulo 43), not 0|
|16||use FULL-ASCII CODES39, not 43 character CODE39|
If you wish to specify more than one option simply add together the values in the table to produce the value for the OPTIONS parameter.
The low current mode can increase battery life (it may occasionally reduce the first read rate). Example, with one datapak connected, the current consumption while using the Bar Code Reader in low current mode, may be reduced to one sixth of normal current consumption. This reduction is achieved by switching packs on and off at various times, while using the Bar Code Reader.
When a successful read is made, the string returned by BAR$: will be made up like this:
<ID character><code><checksum digit>
So a successful read of, for example, an EAN type bar code might return a string like "A5012672905007". The first character, "A" signifies that the bar code encountered was an EAN type, and the last character, "7", is the EAN checksum digit. The rest of the digits make up the code itself.
The table in the section on the TYPE parameter lists the ID character returned for the different types of bar code. If your TYPE parameter allowed more than one type of bar code to be read, the ID character tells you which type was in fact encountered.
To split up the returned string, use the OPL string-slicing functions LEFT$, RIGHT$ and MID$.
Note that some types of bar code, eg TELEPEN, may return non-printable ASCII characters, so displaying them directly on the screen may have unpredictable results.
Start and stop characters are returned only for CODABAR and CODE128 types.
For CODABAR a capital A, B, C or D will be returned as the start character. This will be the second character in the string, immediately after the ID character. The stop character T, N, * or E will be returned as the last character in the string. So, for example, "EA1234T" is a valid CODABAR bar code.
For CODEl28 the start character will be either lowercase g, h or i, and no stop character will be returned.
The four function codes in CODE128 are returned as characters with ASCII values 128, 129, 130 and 131, for functions 1 to 4 respectively.
PLESSEY has 2 checksum digits while MODIFIED PLESSEY has either 1 or 2, depending on the value of the OPTIONS parameter. Note that the TELEPEN checksum digit remains in ASCII even if you use the OPTIONS parameter to specify numeric TELEPEN mode.
This version of the Bar Code software has a direction flag at address $E0. After a successful read, this byte will contain 0 if the bar code was read forwards, or a non-zero value otherwise. Use the OPL PEEKB function to look at the contents of this location. This byte should only be read after a call to the BAR$: function, and before any calls to other OPL language extensions.
The following errors may occur while using the BAR$: function:
|231||BAD DEVICE CALL|
|205||ARG COUNT ERR|
|194||BATTERY TOO LOW|
Refer to your Organiser II operating manual for more details of these errors.
The first of these two programs will read only 13 digit, not 8 digit, EAN bar codes, and no other types. When each EAN-13 bar code is read it will be displayed on the screen and written to a data file named "BAR".
To exit from the program, press ON/CLEAR.
DEMO1: LOCAL A$(65) ESCAPE OFF IF EXIST("A:BAR") :REM CHECKING FOR FILE OPEN "A:BAR",A,BARNO$ ELSE CREATE "A:BAR",A,BARNO$ ENDIF DO CLS :AT 6,1 :PRINT "READY" A$=BAR$:(1,-1) :REM EAN ONLY, EXIT ON KEY IF LEN(A$)=0 KEY :STOP ENDIF A$=MID$(A$,2,255) IF LEN(A$)=13 :REM CHECK EAN-13, NOT EAN-8 BEEP 200,30 CLS :AT 1,2 PRINT "WRITING TO FILE": AT 1,1 PRINT A$ :A.BARNO$=A$ :APPEND PAUSE 20 ENDIF UNTIL KEY=1
The next program will read any of the EAN, UPC, CODE39 and ITF bar code formats, displaying the type and the bar code on the screen. It will end if 30 seconds elapses without a successful read, or if a key is pressed. The program uses low current mode.
DEMO2: LOCAL B$(65),T$(1) ESCAPE OFF PRINT " READY" WHILE 1 B$=BAR$:(15,-600,1) IF B$="" :REM TIMEOUT OR KEYPRESS KEY :STOP ELSE CLS T$=LEFT$(B$,1) IF T$="A" :PRINT "EAN" ELSEIF T$="B" :PRINT "UPC" ELSEIF T$="C" :PRINT "CODE39" ELSEIF T$="D" :PRINT "ITF" ENDIF PRINT MID$(B$,2,255) BEEP 200,80 ENDIF ENDWH
To read a card in the magnetic card swipe reader built into the unit, you draw the card through the slot from left to right with the magnetic strip downwards and away from you. However, some programming needs to be done before it can be used.
When the card reader software is booted in, a language extension SWIPE$: is automatically added to OPL. It can be used like OPL functions - but notice that it ends in a colon.
The language extension SWIPE$: is only available in OPL if there is a swipe reader attached.
This reads a card and returns the data on track 2 of the card or a null string. (Consult the card manufacturers for details of the data.)
p% - Specifies the parity of the check digit used on the cards to be read.
1 - Even bit parity. (Used by most credit cards.)
2 - Odd bit parity. (Used by most cash cards.)
3 - Either of the above.
If you are uncertain of the bit parity of the cards you need to read, contact the card manufacturers or use 3.
t% - Specifies the exit from SWIPE$:
|0||On a good read only.|
|-1||On a good read or a key press.|
|>1||On a good read or after t% 20ths of a second.|
|<-1||On a good read or after t% 20ths of a second or key press.|
=> If exit is from timeout or a key press, a null string is returned.
=> If exit is from a good read, the parity of the check digit read is returned as 1 (even) or 2 (odd) in zero page location $e0.
f% - An optional parameter - specifies the field separator returned
In most cases this parameter is unnecessary. Add the value 1 only if the cards you are reading have the extra characters A to F to read as well as the numbers 0 to 9. (This is unlikely on ordinary credit cards)
0 (Or unspecified) Returns "F" as the field separator. (Extra characters not allowed.)
1 Returns "D" as the field separator. (Extra characters are decoded as ASCII characters A to F.)
231 BAD DEVICE CALL - Incorrect parameter values on SWIPE$:
230 DEVICE MISSING - Printer/Modem has been removed after booting in software.
214 TYPE MISMATCH - Parameter types incorrect.
205 ARG COUNT ERR - Number of arguments incorrect.
194 BATTERY TOO LOW - The Organiser battery is low
193 DEVICE READ ERR - This could be one of three things:
1. Card has been swiped too quickly, slowly, or unevenly.
2. Card is damaged.
3. Built-in swipe reader not present.
The first procedure just activates the built-in swipe reader, displays the prompt "SWIPE CARD", reads the card and prints the card number.
CARD1: local a$(100) cls : print "SWIPE CARD" a$=swipe$:(3,-1) REM exit if a key is pressed while waiting for a card. if as="" key return endif lprint chr$(15)+"CARD NO:"+chr$(23)+a$ cls : print "Card number" view(2,a$)
The second procedure does more error handling. It checks to see if the printer is attached. Then to see if the built-in swipe reader is attached. If so, it prompts "SWIPE CARD", reads the card and prints the number on the screen.
Note: If SWIPE$: returns instantly with DEVICE READ ERR that means the built-in swipe reader is not present.
CARD2: local a$(100),b$(1) escape off REM see if printer is present onerr NOPRINT:: xcomm:(0) :REM try to turn on printer PAUSE 5 xcomm:(7) :REM turn off all devices PAUSE 5 onerr SWERR1:: REM Check for bui1t-in swipe reader a$=swipe$:(3,2) SWAGAIN:: onerr SWERR2:: cls : print "SWIPE CARD" a$=swipe$:(3,-1) REM exit if a key is pressed while waiting for a card. if a$="" key GOTO END:: endif REM Turn Printer ON XCOMM:(0) pause 5 REM Lprint card number LPRINT CHR$(22) lprint "CARD NO:"+a$ LPRINT CHR$ (23) cls : print "Card number" view(2,a$) REM shut printer off XCOMM:(7) goto SWAGAIN:: REM error handler to see if built-in swipe reader present SWERR1:: onerr off REM no built-in swipe reader if err=193 cls :print " NO BUILT-IN " print " SWIPE READER" get goto end:: endif goto ERRH:: REM error handler to handle BAD reads SWERR2:: onerr off REM if bad read if err=193 print chr$(16); : REM BEEP goto SWAGAIN:: : REM and try again endif goto ERRH:: REM error handler to check if printer is installed NOPRINT:: onerr off REM no printer present if err=203 cls : print "PRINTER SOFTWARE"; print " NOT INSTALLED" get goto end:: else goto ERRH:: endif REM Standard Error Handler ERRH:: onerr off REM decode printer errors if err<185 and err>181 cls : print "PRINTER" if err=184 print " BATTERY LOW"; elseif err=183 print " TIMEOUT"; else print "ESCAPE"; endif else print err$(err): endif print chr$(16) get end:: XCOMM:(7) PAUSE 5 stop
Some readers read Track 2 (See section 5.2); others read Tracks 1 or 2. and some read Tracks 2 or 3; this depends on the card reader head installed by Extech. If you are unsure about which reader you have, contact the selling dealer or Extech. For multitrack readers use the following software interface.
Note: The reader is only accessible while not printing data.
The command syntax is: <ESC> <M> <timeout> <track#> <CR>.
The command <ESC> <M> will turn on the mag card reader. The "M" may be upper or lower case.
The timeout is set as <timeout> seconds with a maximum value for timeout of 99 seconds. The two parameters are fixed format: two numeric digits for the timeout and one for the track number.
Note: Invalid commands are lost. No delineators are used.
If "0" is passed as the timeout, then the reader will wait until a good read is available. If timeout is given other than "0" then decoding waits until a good read or the amount of time given in seconds. whichever comes first.
Depending on model, specify Track "1" or "2" or "3".
If <ESC> <C> is sent before the timeout expires or before getting a good read, the read is cancelled and the appropriate error message is passed back to the host. The reader will accept either odd or even parity.
Only the selected track is read. and only one track is read at any one time. The data will be sent as an ASCII string in following format:
/1/ <TRACK 1 DATA> <CR> <LF> or
/2/ <TRACK 2 DATA> <CR> <LF> or
/3/ <TRACK 3 DATA> <CR> <LF>
depending on the track selected. If the selected track has no data on it or is not present no string is returned. If any errors are generated during a read, an appropriate error message is returned.
Mag Card Reading is not available during printer operation, nor is printing available during Mag Card Reader use. Any characters sent by the host to the printer during card reading process are lost. Reading is valid in only one swipe direction. The read direction is determined by the mechanical assembly of the mag reader head with respect to the printer housing. Properly assembled units will read from left to right. when the mag reader is toward the user. Cards will be oriented with the mag stripe away from the user, and upside down
All error messages are prefaced by <ECS> <E>. Following the <ECS> <E> is a comma, the error number, another comma, and the English description of the error, and finally a <CR> <LF>. The syntax is as follows:
<ESC><E>,nn,Error Text in ASCII <CR><LF>
Where nn ranges from 01 to 09
The following messages are returned by the firmware:
01 Parity Error<CR> <LF>
02 Checksum Error<CR> <LF>
03 End Sentinel Not Found<CR> <LF>
04 Too Many Characters<CR> <LF>
05 Timeout Expired<CR> <LF>
06 Invalid Character<CR> <LF>
07 Invalid Track Number<CR> <LF>
08 Unsupported Track Selected<CR> <LF>
09 Cancel Request<CR> <LF>
The full description of each error condition is as follows:
The names of the ASCII control characters are shown below. For the full printable ASCII character set, see the relevant Appendix in the Organiser manual.
This Appendix describes the hardware interface which is presented by the Comms port and contains technical information which may be required for advanced communications applications or for building your own adaptor.
|Signal Name||Comms Port Pin|
|FG||Frame Ground (earth)||Outer Shell|
|SG||Signal Ground (common return)||5|
|TD||Transmitted Data (From Organiser)||3|
|RD||Received Data (To Organiser)||2|
|RTS||Request To Send||7|
|CTS||Clear To Send||8|
Although the Organiser can read DSR, it cannot drive DTR. However, the Comms Port can be connected to the Organiser so that if the DTE is asserted it has the same effect as the ON/CLEAR key. Contact Extech for details of this modification. The main application of this feature is when the Organiser is connected to a Comms Modem set to auto-answer which is waiting to be dialed.
Here are some example programs to try. All of these programs are contained on the diskette supplied with the Comms Printer. These procedures show how OPL works with the Comms Printer and/or the Comms Port in applications.
Note: Whenever the "-" symbol appears in a listing it indicates a program line was longer than the page width of this manual. Enter the line following the symbol as part of the same program line.
Backing up diary files - This example shows how to back up a copy of the Model CM and XP diary files onto a PC, using the Comms Port on the Comms Modem. For Model LZ Organisers, simply select Transmit from the Comms menu and then select File as the file type.
When the following procedure is run it presents a two-item menu: Backup or Restore. When you have made your selection it prompts for the local (Organiser) and remote (PC/Macintosh) file names, in the appropriate order. For the local name, you should enter the device (A:, B: or C: with its colon) and the saved diary file name.
To save the current contents of the diary to a file use the Save option in the Diary menu.
Pressing ON/CLEAR during the input stage will abandon the program,
DBACK: LOCAL lname$(8),rnames(8),m% m%=MENU("Backup,Restore") IF m%=1 PRINT "From:"; TRAP INPUT lname$ IF ERR=206 :RETURN :ENDIF PRINT "To:"; TRAP INPUT rname$ IF ERR=206 :RETURN :ENDIF XTSEND:(rname$,lname$,2) ELSEIF m%=2 PRINT "TO:"; TRAP INPUT lname$ IF ERR=206 :RETURN :ENDIF PRINT "From:"; TRAP INPUT rname$ IF ERR=206 :RETURN :ENDIF XTRECV:(rname$,lname$,2) ENDIF
CP2DISK: REM SAMPLE PROGRAM FOR RUNNING COMMS PRINTER II LOCAL I%,N%,T%,A$(1),B$(24),C$(2) LSET:(2400,0,8,1,2,1,42) :REM SET COMMS TO 2400,N,8,1,RTS XCOMM:(0) :PAUSE 5 CLS :PRINT "PRINTER ON" LPRINT CHR$(250)+" NORMAL FONT" LPRINT CHR$(14)+" DOUBLE WIDE" LPRINT CHR$(28)+" DOUBLE HIGH" LPRINT CHR$(14)+CHR$(28)+" DOUBLE HIGH+WIDE" :LPRINT LPRINT CHR$(250)+" FULL LZ CHARACTER SET" REM PRINT ALL CHARACTERS DOUBLE HIGH+WIDE I%=32 LPRINT CHR$(14)+CHR$(28); :REM DOUBLE HIGH+WIDE DO LPRINT CHR$(I%); :I%=I%+1 UNTIL I%=256 :LPRINT LPRINT CHR$(27)+"G" :REM ENTER GRAPHICS MODE REM FAKE BARCODE PRINTOUT ROUTINE B$="ABCDEFGHIJKLMNOPQRSTUVWX" N%=0 REM LOOP FOR REPEATING 40 DOT LINES DO LPRINT B$ :N%=N%+1 UNTIL N%=40 LPRINT CHR$(27)+"A" :REM RETURN TO ASCIIMODE LPRINT CHR$(28)+"EXTECH DATA SYSTEMS" A$=LINPUT$:(0) :REM CLEAR INPUT BUFFER A$=LINPUT$:(1) :REM WAIT FOR ^D REM TEST FOR RESPONSE IF A$=CHR$(4) :PRINT "PRINTER DONE" :PAUSE 10 :GOTO OUT:: ELSEIF A$=CHR$(21)+CHR$(19) :REM LOOK FOR ^U^S REM CHECK FOR PAPER OUT CLS :PRINT "OUT OF PAPER" :BEEP 100,200 REM WAIT FOR PAPER IN DETECT, ^Q^R C$=LINPUT$:(2) IF C$=CHR$(17)+CHR$(18) :PRINT "ERROR" :PAU5E 20 :STOP ELSE :ENDIF ELSE :ENDIF OUT:: XCOMM:(7) :REM PRINTER OFF OFF :REM ORGANISER OFF
Opening and reading a binary file - This procedure simply opens a file, reads a series of strings from it (up to 10 strings, each 80 bytes long) and then closes the file. Before each read it checks that the end of the file has not yet been reached. If an error occurs on the PC or Macintosh the appropriate error number is printed to the Organiser screen
READ: LOCAL b$(10,80),i% i%=1 ONERR panic:: XFOPEN:("remote.doc",0,0) WHILE 1 b$(i%)=XFGET$:(80) IF XFEOF: BREAK ENDIF i%=i%+1 IF i%=11 PRINT "Too many records" GET CLS :BREAK ENDIF ENDWH XFCLOSE: panic:: IF ERR<=190 PRINT "Remote error" PRINT "number",ERR ELSE PRINT ERR$(ERR) ENDIF GET
The example program below illustrates the use of DIRW$ in a loop to send multiple files. Note that it is necessary to:
=> Remove the file extension from the string returned by DIRW$. so that the file name is acceptable for local$.
=> Use this file extension to find out the correct type number to be given to type%.
A null string ("") is provided for the remote file name in XTSEND; XTSEND: automatically gives the file on the PC the name local$, with the PC extension appropriate for type%.
SENDALL: LOCAL remote$(8),local$(14),b$(4) LOCAL type%,len% local$=DIRW$("A:*.*") WHILE local$<>"" b$=RIGHT$(local$,4) len%=LEN(local$)-4 local$=LEFT$(local$,len%) remote$=RIGHT$(local$,(len%-2)) IF b$=".ODB" type%=0 ELSEIF b$=".OPL" type%=1 ELSEIF b$=".DIA" type%=2 ELSEIF b$=".COM" type%=4 ELSEIF b$=".PLN" type%=5 ELSEIF b$=".PAG" type%=6 ELSEIF b$=".NTS" type%=7 ENDIF PRINT "Send",local$;b$ XTSEND:(remote$,local$,type%) local$=DIRW$("") ENDWH CLS :PRINT "Job done" :GET
If you want to send procedures and notepad files as binary instead of text, change type%=1 lo type%=3 and type%=7 to type%=16. A program to restore all Organiser files from the PC would have to sort out which files in the directory are Organiser type files. To do this, you could use XFGET$: to read the directory.
When using OPL to access the Comms Printer, it is possible for an error message such as "DEVICE LOAD ERROR" to occur. The error usually occurs only when running OPL programs more than once without pressing the ON/CLEAR button in between runnings of the program. A Program called REBOOT will initialize the Comms Printer each time your program is run. We suggest entering this program onto a datapack for permanent storage. Here is a listing for the REBOOT procedure:
reboot: rem boots any devices into memory LOCAL I%,Code$(4) I%=ADDR(Code$)+1 : Rem Skip the size byte of the string POKEB I%,$3F : Rem The SWI instruction POKEB I%+1,23 : Rem The DV$BOOT vector number POKEB I%+2,$39 : Rem a return instruction USR(I%,0) : Rem Call the machine code
REBOOT should he entered immediately prior to the first LSET, LPRINT or LINPUT command in your OPL Program. For example.
As with the Baud parameter, Parity, Data Bits and Stop must match the corresponding settings on the communicating device. If they don't, then the communicating device will almost certainly incorrectly receive data sent to it, and the Organiser will incorrectly interpret its received data.
These parameters determine how each character to be transmitted over the Comms Link is converted into bits. The Organiser transmits and receives data in groups ('frames') of 10 or 11 bits. One character, or 'byte', of data is included in each frame, together with other information. The character itself is given by the 7 or 8 'data bits':
<Start bit><Data bits><Parity bit><Stop bits>
The start and stop bits are used to define the beginning and end of a frame:
The start bit of a frame is always present and cannot be altered.
The value of the Stop bits cannot be altered, but you can choose whether to have 1 or 2 of them. Usually 1 stop bit is sufficient, but with slow baud rates (300 or lower) or when communicating with some mechanical devices you may need to have 2 bits. Having 2 stop bits rather than 1 will never cause an error - it will just slow down the byte transfer rate. Putting 1 when you should have 2, however, will cause an error.
The number of stop bits is also used to make up the length of the frame to either 10 or 11 bits, which are the only lengths of frames which the Organiser can transfer, when the other bits don't add up to one of these totals. The software overrides the Stop parameter value under the following circumstances:
The number of data bits is specified by the Data Bits parameter. When there are only 7 data bits in the frame, the missing 8th bit (the most significant bit) is set to zero.
If the Parity parameter is set to NONE, there is no parity bit, Otherwise the parity bit is present and its value (0 or 1) is determined by the Parity parameter setting. To find out the correct setting, consult the documentation of the machine you are attaching to or use trial and error. MARK and SPACE parity are rarely used.
One way of telling that your Parity, Data Bits and/or Stop settings are incorrect is to see whether in terminal emulation characters are being displayed as a solid block. These are characters which are received with an error and are set to ASCII 255 - a solid block. (This my also indicate that your Baud setting is wrong.) In other cases e.g. during file transfer or a call via Comms Link from an OPL procedure, a DEVICE READ ERROR is reported. If the parameter values do not match those of the correspondents but are not too dissimilar, you may receive some characters (sometimes as much as half the characters) without error.
Some manufacturers include the parity bit in their definition of data bits. This means that 7 data bits and a parity bit would be called 8 data bits. Check the definition of data bits used by your target device in its documentation.
The setting of Parity, Data Bits and Stop are ignored in communications involving the PSION protocol. PSION uses 8 data bits, no parity and 1 stop bit. Other than this case, the Parity, Data Bits and Stop parameters are used by all aspects of the Comms Link software.
Here are some commonly encountered problems and their solutions. If your problem is not in the list, or if the recommended solution has no effect, contact your dealer for assistance.
|Printer will not turn on||Discharged Battery||Charge battery overnight|
|Power LED not turning on||Printer not selected||Select PRINTER from DEVICE menu.|
|Power LED not changing color when AC adaptor plugged into printer||No AC Power||Check AC outlet and adapter output voltage.|
|Paper not feeding||Caught in paper blade||Clear paper from paper blade.|
|Printer not printing||Paper not loaded||Check paper roll|
|Battery not charging||Battery incorrectly installed||Check battery installation.|
|No AC Power||Check AC outlet and adaptor output voltage.|
|Poor print quality||Worn ribbon or incorrectly installed||Replace ribbon.|
|Low Battery||Recharge battery.|
|Worn Printhead||Check Printer Self-Test.|
Contact service center.
|Special function keys inoperative||COMMS menu selected||Will not work in COMMS or when BAR$ function is active.|
* To check printer Self-Test perform the following:
1. Hold paper feed button down.
2. Select PRINTER from DEVICE Menu. The printer will continuously print until DEVICE NONE is selected.
EXTECH DATA SYSTEMS
A Division of Extech Instruments Corporation
335 Bear Hill Road, Waltham MA 02154
Tel: (617) 890-7140 FAX: (617) 890-7864
7A060018 - 3/94-R2