Paxar Gold 6037EX Programmer's Manual

Paxar printer programmer's manual
Table of Contents

Advertisement

Quick Links

Monarch
Pathfinder Ultra
6037EX
*ROG
Printer
TC6037EXPM Rev. AA 8/03
Printed in the U.S.A.
©2003 Paxar Americas, Inc. All rights reserved.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Gold 6037EX and is the answer not in the manual?

Questions and answers

Summary of Contents for Paxar Gold 6037EX

  • Page 1 Monarch Pathfinder Ultra 6037EX *ROG Printer TC6037EXPM Rev. AA 8/03 Printed in the U.S.A. ©2003 Paxar Americas, Inc. All rights reserved.
  • Page 2 Each product and program carries a respective written warranty, the only warranty on which the customer can rely. Paxar reserves the right to make changes in the product and the programs and their availability at any time and without notice. Although Paxar has made every effort to provide complete and accurate information in this manual, Paxar shall not be liable for any omissions or inaccuracies.
  • Page 3: Table Of Contents

    TA B L E O F C O N T E N T S Introduction ...1-1 System Requirements ...1-2 Hardware Requirements ...1-2 Software Requirements ...1-2 SDK Contents...1-3 Related Documentation ...1-4 Printer Features ...2-1 Display ...2-2 Display Pages ...2-2 LCD Utility ...2-3 Keypad ...2-4 Speaker ...2-5 Memory ...2-5 Fonts ...2-7...
  • Page 4 Windows 95/Network Notes... 2-15 Directory Names ... 2-15 Copying Data from the Printer to PC ... 2-15 Developing Applications ...3-1 Creating MPCL Packets ...3-2 Writing Applications ...3-2 Building Applications...3-3 Compiling Applications ...3-3 Linking Applications ...3-4 Using UServe and UClient ...3-4 Test the Application ...3-4...
  • Page 5 pclGetErrorMsg ... 4-28 pclGetOnDemandSensor... 4-30 pclGetSupplyType... 4-33 Init ... 4-35 pclOpen ... 4-37 pclPaperInfo... 4-38 pclPaperSetup ... 4-39 pclStatus ... 4-42 pclWrite ... 4-43 scnCloseScanner ... 4-44 scnGetBarCodeType ... 4-46 scnGetch ... 4-48 scnGetche ... 4-50 scnGetCodabarInfo ... 4-52 scnGetCode128Info ... 4-53 scnGetCode39Info ...
  • Page 6 scnSetCodabarInfo ... 4-74 scnSetCode128Info ... 4-76 scnSetCode39Info ... 4-78 scnSetCode93Info ... 4-80 scnSetD2of5Info ... 4-82 scnSetGeneralInfo ... 4-84 scnSetI2of5Info ... 4-86 scnSetMS Info... 4-88 scnSetScanInfo ... 4-90 scnSetUPCEANInfo ... 4-92 scnTrigger ... 4-95 spkBeep ... 4-96 sysGetBIOSVersion ... 4-97 vidBackLightOn ... 4-99 vidGetState ...
  • Page 7 Loading Multiple Packets Together ...6-4 Building Packets Dynamically...6-5 Using the Scanner ...6-5 Reading Trigger Pulls...6-5 Audio/Visual Feedback ...6-6 Using UServe and UClient ...7-1 Establishing a PC/Printer Connection ...7-1 Copying Files...7-3 Example File Copy ...7-4 UClient Commands ...7-5 Syntax Conventions ...7-6 close ...7-7...
  • Page 8 get ...7-7 help...7-8 lcd ...7-9 ldel ...7-9 ldir ... 7-10 lmd... 7-11 lrd ... 7-11 lwd ... 7-12 open ... 7-12 ping... 7-13 put ... 7-13 putbios ... 7-14 puttrueffs ... 7-14 quit ... 7-15 reboot ... 7-15 setbaud ... 7-16 setport ...
  • Page 9 Sample Applications ... A-1 Sample 1 ... A-2 Sample 2 ... A-2 Sample 3 ... A-3 Sample 4 ... A-4 Sample 5 ... A-4 Sample 6 ... A-5 Sample 7 ... A-5 Glossary ... B-1 Table of Contents...
  • Page 10 viii Table of Contents...
  • Page 11: Introduction

    ♦ Related Documentation ♦ About this Manual This manual is written for experienced Microsoft® C/C++ programmers who write printer applications. These programmers should also be familiar with Monarch’s MPCL printer language. The following table describes the conventions used in this manual.
  • Page 12: Hardware Requirements

    ♦ hard disk with 8 MB of free space (not including the space needed for C/C++) ♦ Windows 95® (or higher)-compatible CD-ROM drive ♦ serial port ♦ a printer-to-PC cable (part number 124054). Software Requirements Your PC needs the following software: ♦ Microsoft Windows 95 or higher ♦...
  • Page 13: Sdk Contents

    It is divided into several sub-directories, as described below. Sub-directory Description Development tools docs Online documentation ROM-DOS™ files font MPCL packets containing the printer’s external base fonts images Pre-built ROM disk images include Include files Library files samples Source code samples...
  • Page 14: Related Documentation

    Application Notes Packet Reference Manual Datalight Sockets Developer’s Guide 1-4 Programmer’s Manual Description Information about the printer’s ROM- DOS operating system. Information about printer operation. Technical information needed for application development (beyond writing a C/C++ program). It contains information on radio networks, memory cards, etc.
  • Page 15: Printer Features

    P R I N T E R F E A T U R E S There are several printer features that you must understand to write applications. For example, just knowing that the printer has a display does not help. You must know its size, how it treats messages written to it, how the rows and columns are numbered, and which functions manipulate it.
  • Page 16: Display Pages

    D i s p l a y The printer has an 8-row display. The printers can display characters in either reverse or normal video. A display backlight is also available. Several functions that manipulate the display use a coordinate system to access a certain point on the display. Coordinate (0,0) (row , column) is the display’s upper-left corner.
  • Page 17: Lcd Utility

    You must reference this utility in AUTOEXEC.BAT to enable the display before you run your application. , and p r i n t f p u t s p u t c Printer Features 2-3...
  • Page 18: Keypad

    LCD [ o p t i o n s … ] You can enter one or more of the following options on the command line. Enable the display. This option is the default. Disable the display. Set the display speed to fast. Set the display speed to slow.
  • Page 19: Speaker

    S p e a k e r Applications can make the printer speaker beep for different lengths of time and frequencies. For example, you might use the speaker to bring an error to the operator’s attention or to indicate a good scan. The spkBeep function (described in Chapter 4) manipulates the speaker.
  • Page 20 Following is the address map for the printer. 200000 180000 100000 F0000 F0000 – F F F F F EE000 – EFFFF EC000 – EDFFF DC000 – E B F F F AA000 – ABFFF A8000 – A9FFF A0000 80000 500 –...
  • Page 21: Fonts

    F o n t s The printer has many resident fonts. You must load other fonts separately. Following is a list of these fonts and their IDs. Standard (1) Reduced (2) Bold (3) OCRA (4) HR1 (5) HR2 (6) CG Triumvirate Bold® 9 pt. (10) CG Triumvirate 6 pt.
  • Page 22: Using Non-Resident Fonts

    CG Triumvirate Bold Condensed (Full Character Set) 12 pt. (1009) CG Triumvirate Bold Condensed (Partial Character Set) 18 pt. (1010) CG Triumvirate Bold Condensed (Partial Character Set) 22 pt. (1011) Letter Gothic Bold (Full Character Set) 6 pt. (1012) Letter Gothic Bold (Full Character Set) 9 pt. (1013) The partial character set fonts contain only numeric and special characters.
  • Page 23: Scanners

    S c a n n e r s Each printer comes with either of two bar code scanners. S E -923 S E -923HS Using the Scanners To use the either scanner, the application must 1 . Enable the scanner with scnOpenScanner or scnOpenScannerShared.
  • Page 24: Scanner Function Overview

    Scanner Function Overview Scanner Buffer scnGets s c n T r i g g e r s c n G e t c h s c n G e t c h e scnScannerHit scnGetBarCodeType The scanner contains a buffer to hold the data from a scan. The application should contain a buffer of its own if it needs to save the data before scanning again.
  • Page 25: Boot Process

    2 . A line moves left to right across the display’s bottom to indicate the boot process is working. 3 . The printer loads CONFIG.SYS (if it exists) and runs AUTOEXEC.BAT. When AUTOEXEC.BAT does not exist, is bypassed (see “Boot Options ”), or does not enable the display, the printer prompts the operator for the date and time.
  • Page 26: Display Control

    LCD command in AUTOEXEC.BAT. CONFIG.SYS messages are still disabled, because the printer processes it first. See “LCD” in Chapter 7 for more information. Disabling the Display To disable the display, include the LCD N command in AUTOEXEC.BAT.
  • Page 27: Booting From A Pc

    2 . Enter REMSERV A: at the PC’s DOS prompt, where X is the drive where the boot files reside. 3 . Turn on the printer and from the Startup Menu, choose #3. The printer boots from the PC. , which enables the display ).
  • Page 28: Startup Menu

    Ultra Server Starts UServe for loading an application (see”Using UServe and UClient”). Remote Server Runs REMDISK to enable you to boot the printer from the PC (See “Booting from a PC.”) System Options Displays the following submenu. 2-14 Programmer’s Manual 6037 Startup Menu 1.
  • Page 29: Directory Names

    Copying Data from the Printer to PC 1 . Connect the cable between the PC and the printer. 2 . Use UServe and UClient to copy the file(s) from their location on the printer to the printer’s mapped drive.
  • Page 30 2-16 Programmer’s Manual...
  • Page 31: Developing Applications

    2 . Write the application. 3 . Build (compile and link) the application. 4 . Use UServe and UClient to copy files to the printer. 5 . Test the application. 6 . Train the end users. Developing Applications...
  • Page 32: Creating Mpcl Packets

    4 . When the Startup menu appears, press 2, then e. “Online Passthrough running…” appears on the printer display. 5 . Connect the PC and printer with a cable and send formats to the printer through the COM port. To exit Online Passthrough, reboot the printer.
  • Page 33: Building Applications

    B u i l d i n g A p p l i c a t i o n s A build consists of compiling and linking the application’s source code. If your application has multiple source code files, you must compile and link separately. For applications with one source code file, you must compile and link in one step.
  • Page 34: Linking Applications

    U s i n g U S e r v e a n d U C l i e n t To install the application on the printer, you must use UServe and UClient to copy the files to the printer. See Chapter 7 for more information.
  • Page 35: Training The End Users

    T r a i n i n g t h e E n d U s e r s The last step in the development of an application is to train the end users (Operators) and/or their supervisor (System Administrator). Depending on the application’s complexity, this training may include a class, written instructions, or any other appropriate format.
  • Page 36 Programmer’s Manual...
  • Page 37: Function Reference

    F U N C T I O N R E F E R E N C E The SDK contains several libraries of functions you can call in your application. This chapter describes these functions. It lists them alphabetically. The functions are divided into the following categories: Prefix Description Keypad Interface...
  • Page 38: Kbdclrfunct

    k b d C l r F u n c t Description Changes the keypad’s data entry mode to the mode in effect immediately before the application called kbdSetFunct. Syntax void kbdClrFunct(void); Parameters None Return Values None Example See “kbdSetFunct” for an example. Programmer’s Manual...
  • Page 39: Kbdgetmode

    k b d G e t M o d e Description Checks if Function Key mode is set or saves the keypad mode (Numeric/Normal, Upper-case Alpha, or Lower-case Alpha) until the application calls kbdRestoreMode. Syntax int kbdGetMode(void); Parameters None Return Values Numeric/Normal mode Upper-case Alpha mode Lower-case Alpha mode...
  • Page 40: Kbdrestoremode

    k b d R e s t o r e M o d e Description Changes the keypad’s data entry mode to the one saved previously when the application called kbdGetMode. Syntax void kbdRestoreMode(int); Parameters Numeric/Normal mode Upper-case Alpha mode Lower-case Alpha mode Return Values None...
  • Page 41 printf("\nPress the same key: "); // Test the mode while (_kbhit()) iInput = _getch(); printf("\nYou pressed %c\n", iInput); Function Reference 4-5...
  • Page 42: Kbdsetalpha

    k b d S e t A l p h a Description Changes the keypad’s data entry mode to Lower-case Alpha mode. Syntax void kbdSetAlpha (void); Parameters None Return Values None Example #include <stdio.h> #include <conio.h> #include "mmsultra.h" void main(void) int iSavedmode = 0;...
  • Page 43 printf("\nPress the same\nkey: "); // Test the mode while (_kbhit()) iInput = _getch(); printf("\nYou pressed %c\n", iInput); Function Reference 4-7...
  • Page 44: Kbdsetcaps

    k b d S e t C a p s Description Changes the keypad’s data entry mode to Upper-case Alpha mode. Syntax void kbdSetCaps(void); Parameters None Return Values None Example See “kbdSetAlpha” for an example. Programmer’s Manual...
  • Page 45 k b d S e t F u n c t Description Changes the keypad’s data entry mode to Function Key mode. Syntax void kbdSetFunct(void); Parameters None Return Values None Function Reference 4-9...
  • Page 46: Kbdsetfunct

    Example #include <stdio.h> #include <conio.h> #include "mmsultra.h" void main(void) int iInput = 0; int iNum = 0; kbdSetNormal(); kbdSetFunct(); printf("Press 5 to print\nlabels\n"); iInput = _getch(); if (iInput == 0x00) kbdClrFunct(); iInput = _getch(); if (iInput == 0x3F) printf("How many labels do\nyou need?"); iNum = _getch();...
  • Page 47 k b d S e t N o r m a l Description Changes the keypad’s data entry mode to Numeric/Normal mode. Syntax void kbdSetNormal(void); Parameters None Return Values None Example #include <stdio.h> #include "mmsultra.h" void main(void) char cName[25]; char cNumber[4]; kbdSetCaps();...
  • Page 48: Pclbatteryoktoprint

    B a t t e r y O k T o P r i n t Description Checks if the printer’s NiCd battery (located in the handle) is charged enough to allow printing. It is good programming practice to check the battery level before doing any printing.
  • Page 49 C a l i b r a t e Description Calibrates the supplies in the printer and gives the supply information to the Print subsystem. Operators can load supplies (as described in the Manual ) before running an application, but they cannot calibrate the supplies until the application calls this function.
  • Page 50 Enter Enter Successful. An error occurred. For errors between 703- 793, the operator corrects the printer condition. Then, the application must call pclClearError to reset the Motion Control subsystem. Refer to the MPCL Reference Manual for more information.
  • Page 51 (unsigned short far * lpusLenInches, unsigned short far * lpusWidthInches); void main() PRINTINIT rConfig; unsigned short usStatus = 0; /* Initialize the printer */ usStatus = pclInit(NULL); if (usStatus != 0) printf("Init Failed\nError: %d", usStatus); exit(1); /* Calibrate with the function doing all the prompts */ usStatus = pclCalibrate(0xFFFF, 0xFFFF, 0xFFFF, 0, 0);...
  • Page 52 /* Calibrate with constant 2" width and paper type */ /* Let function prompt for the stock length */ usStatus = pclCalibrate(0xFFFF, 200, MMS_LOW_ENERGY, 0, 0); if (usStatus != 0) printf("Calibrate Failed\nError: %u", usStatus); pclClose(); exit(1); pclClose(); exit(0); /* Calibration callback function to prompt for paper type */ unsigned short far pascal StockTypePrompt (unsigned short far * lpusPaperType) short sCols, sPages, sKey;...
  • Page 53 /* Calibration callback function to always return constant size */ unsigned short far pascal StockPrompt (unsigned short far * lpusLenInches, unsigned short far * lpusWidthInches) *lpusLenInches = 200; *lpusWidthInches = 150; return(0); // return success Function Reference 4-17...
  • Page 54: Pclcalibrate

    C a l i b r a t e P a p e r Description Calibrates supplies in the printer. Operators can load supplies (as described in the Manual ) before running an application, but they cannot calibrate the supplies until the application calls this function.
  • Page 55 Return Values Successful. Non-zero An error occurred. For errors between 703-793, the operator corrects the printer condition. Then the application must call pclClearError to reset the Motion Control subsystem. Refer to the MPCL information. Example See “pclPaperSetup” for an example.
  • Page 56 Resets the Motion Control subsystem after an application receives a motion control error (703-793). Of the pcl functions, only pclGetErrorMsg cannot generate a motion control error. The operator must correct the printer condition (a supply jam, for example) before the application calls this function. Syntax void far pclClearError(void);...
  • Page 57 Closes the Print subsystem by freeing all internally allocated resources. A call to this function must occur only once (at the application’s end). If the application does not call it, the printer locks up. Syntax void far pclClose(void); Parameters None...
  • Page 58 Parameters None Return Values Successful. 703-793 A motion control error occurred. After the operator corrects the printer condition, the application must call pclClearError to reset the Motion Control subsystem. Refer to the MPCL Manual 4-22 Programmer’s Manual for more information.
  • Page 59: Pclclearerror

    (sStatus != 0) printf("Init Failed\nError: %d", sStatus); else usStatus = pclGetBatteryLevel(); if (usStatus > 711) usStatus = pclFeed(); if (usStatus != 0) printf("Feed Error-- press any key when printer is reset."); _getch(); pclClearError(); else printf("Charge battery"); pclClose(); // Print data structure...
  • Page 60 Parameters None Return Values <= 711 You must charge the battery. 712-831 The battery level is high enough to run the printer, but not print. >= 832 The battery level is high enough to run the printer and print. 4-24 Programmer’s Manual...
  • Page 61 Example #include <stdio.h> #include "mmsultra.h" void main(void) PRINTINIT pConfig; short sStatus = 0; unsigned short usStatus = 0; sStatus = pclInit(NULL); if (sStatus != 0) printf("Init Failed\nError: %d", sStatus); else usStatus = pclGetBatteryLevel(); if (usStatus <= 711) printf("Charge the battery"); else if (usStatus >= 832) printf("Can run and print");...
  • Page 62 The supplies are not aligned on the black mark, or the Print subsystem is busy or uninitialized. 703-793 A motion control error occurred. After the operator corrects the printer condition, the application must call pclClearError to reset the Motion Control subsystem. Refer to the MPCL information.
  • Page 63: Pclgetblackmarksensor

    Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) PRINTINIT pConfig; unsigned short usStatus = 0; short sStatus = 0; sStatus = pclInit(NULL); if (sStatus != 0) printf("Init Failed\nError: %d", usStatus); else usStatus = pclGetBatteryLevel(); if (usStatus <= 711) printf(“Charge your battery”); else usStatus = pclGetBlackMarkSensor();...
  • Page 64: Pclgeterrormsg

    p c l G e t E r r o r M s g Description Testing/Debugging Only. Retrieves a pointer to the error message corresponding to a specified error number. Use this function on error numbers returned by pclOpen, pclWrite, and pclStatus.
  • Page 65 Example #include <stdio.h> #include "mmsultra.h" void main(void) short sStatus = 0; short usStatus = 0; char far* cStatus = NULL; PRINTINIT pConfig; sStatus = pclInit(NULL); if (sStatus != 0) printf("Init Failed\nError: %d", sStatus); else if (!pclBatteryOkToPrint()) printf("Low battery error"); else usStatus = pclOpen("B:\\MPCL\\TEST.FAB");...
  • Page 66: Pclgetondemandsensor

    Return Values The sensor is blocked. The sensor is not blocked. 703-793 A motion control error occurred. After the operator corrects the printer condition, the application must call pclClearError to reset the Motion Control subsystem. Refer to the MPCL information. 4-30 Programmer’s Manual...
  • Page 67 Example #include <conio.h> #include <stdio.h> #include <string.h> #include "mmsultra.h" void main(void) PRINTINIT pConfig; short sStatus = 0; char cFormat[100]; sStatus = pclInit(NULL); if (sStatus != 0) printf("Init Failed\nError: %d", sStatus); else if (!pclBatteryOkToPrint()) printf("Battery too low"); else strcpy(cFormat, "{F,1,A,R,E,400,200,\"1C39\"|"); strcat(cFormat, "B,1,12,F,320,29,4,12,20,8,L,0|"); strcat(cFormat, "R,1,\"666666666666");...
  • Page 68 if (sStatus != 0) printf("Format Write error - %d", sStatus); else sStatus = pclWrite("{B,1,N,1|E,0,0,1,1,0,1|}", 24); if (sStatus != 0) printf("Batch Write error - %d", sStatus); else while ((sStatus = pclStatus()) == 1) sStatus = pclGetOnDemandSensor(); // Check sensor switch (sStatus) case 0: printf("\nNot blocked");...
  • Page 69: Pclgetsupplytype

    MMS_LOW_ENERGY MMS_MEDIUM_ENERGY MMS_HIGH_ENERGY 703-793 Paper Synthetic A motion control error occurred. After the operator corrects the printer condition, the application must call pclClearError to reset the Motion Control subsystem. Refer to the Packet Reference Manual MPCL more information. Function Reference 4-33...
  • Page 70 Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) unsigned short usType = 0; PRINTINIT pConfig; unsigned short usStatus = 0; short sStatus = 0; sStatus = pc Init(NULL); if (sStatus != 0) printf("Init Failed\nError: %d", sStatus); else { usStatus = pclGetBatteryLevel(); if (usStatus <= 711) printf("Charge your battery");...
  • Page 71: Pclinit(

    I n i t Description Initializes the Print subsystem. An application must call this function before calling any other pcl functions. Initialize and close the Print subsystem only Syntax short far pclInit(void); Parameters None Return Values Successful. Example #include <conio.h> #include <malloc.h>...
  • Page 72 if (sStatus == 0) /* Branch to printing routine */ else if (sStatus >= 703 && sStatus <= 793) printf("Motion Control Error"); else printf("Error-- press any key when reset."); _getch(); pclClearError(); pclClose(); 4-36 Programmer’s Manual // Close Print subsystem...
  • Page 73: Pclopen

    .EXE file, specify only the file name. You must use the drive that the printer recognizes. For example, if the files are on the PC’s C: drive, but the printer refers to it as B:, use B: in the path. Return Values Successful.
  • Page 74: Pclpaperinfo

    p c l P a p e r I n f o Description Retrieves information (length, width, and type) about the current supplies. Syntax void far pclPaperInfo(unsigned short far *lpusStockLength, Parameters lpusStockLength lpusStockWidth lpusStockType Return Values None Example See “pclPaperSetup” for an example. 4-38 Programmer’s Manual unsigned short far *lpusStockWidth...
  • Page 75: Pclpapersetup

    p c l P a p e r S e t u p Description Gives information to the Print subsystem about the supplies being used. If you are using paper or synthetic supplies, precede this function with a call to pclCalibratePaper. If an application uses this function and pclCalibratePaper, it should not use Syntax...
  • Page 76 4-40 Programmer’s Manual Successful. A motion control error occurred. For errors between 703-793. The operator corrects the printer condition. Then the application must call pclClearError to reset the Motion Control subsystem. Refer to the MPCL Reference Manual for more information.
  • Page 77 /* If fax, save setting, do not calibrate */ if (usSupplyType == MMS_MEDIUM_ENERGY) GetStockWidth(&usStockWidth); usStatus = pclPaperSetup(usStockLength, usStockWidth, usSupplyType); return(usStatus); usStatus = pclCalibratePaper(&usStockLength, &usStockWidth); if (usStatus != 0) pclClearError(); return(usStatus); /* GetStockLength is a programmer-written function */ GetStockLength(&usStockLength); /* GetStockWidth is a programmer-written function */ GetStockWidth(&usStockWidth);...
  • Page 78: Pclstatus

    S t a t u s Description Retrieves the Print subsystem’s status. After submitting a print job, the application should call pclStatus in a loop, waiting until the printer becomes free. See “Pausing While Printing” in Chapter 6 for more information. Syntax short far pclStatus(void);...
  • Page 79: Pclwrite

    A batch packet starts a print job, which makes an asynchronous call to the Print subsystem. After submitting a print job, the application should call pclStatus in a loop, waiting until the printer becomes free. See “Pausing While Printing” in Chapter 6 for more information. Syntax short far pclWrite(char far* lpchBuffer, unsigned short usCount);...
  • Page 80: Scnclosescanner

    s c n C l o s e S c a n n e r Description Disables the scanner. Be sure to disable the scanner only when it is already enabled. If the application enabled the scanner with scnOpenScanner, ♦ the application should disable the scanner at the end of processing or immediately before any serial communications.
  • Page 81 Example #include <stdio.h> #include "mmsultra.h" void main(void) short sStatus = 0; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else /* Scan Bar Codes */ sStatus = scnCloseScanner(); // Command calls status // Enable scanner // Disable scanner Function Reference 4-45...
  • Page 82: Scngetbarcodetype

    s c n G e t B a r C o d e T y p e Description Retrieves the last scanned bar code’s type. Call this function only after receiving successful return codes from a scan that does not also retrieve the results. The bar code scanned stays in the scanner buffer until the application reads it.
  • Page 83 Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) short sStatus = 0; char cBuffer[50]; int iInput = 0; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner open error-- %d", sStatus); else { printf("Press trigger to scan...\n"); // Perform scan iInput = _getch();...
  • Page 84: Scngetch

    Use scnGetche to retrieve characters and echo them to the display. Syntax short far scnGetch(void); Parameters None Return Values 0-255 The retrieved character. Decoding fault. The scanner scanned the bar code, but the printer could not decode it. Checksum error. Scanner is disabled. Time-out error. 4-48 Programmer’s Manual...
  • Page 85 Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) short sStatus = 0; char cBuffer[100]; char *pBufptr = NULL; int iInput = 0; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); printf("Press trigger to\nscan...\n"); // Perform scan iInput = _getch();...
  • Page 86: Scngetche

    Use scnGetch to retrieve characters without echoing them to the display. Syntax short far scnGetche(void); Parameters None Return Values 0-255 The retrieved character. Decoding fault. The scanner scanned the bar code, but the printer could not decode it. Checksum error. Scanner is disabled. Time-out error. 4-50 Programmer’s Manual...
  • Page 87 Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) short sStatus = 0; char cBuffer[100]; char *pBufptr = NULL; int iInput = 0; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); printf("Press trigger to\nscan...\n"); // Perform scan iInput = _getch();...
  • Page 88: Scngetcodabarinfo

    s c n G e t C o d a b a r I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a CODABARINFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetCodabarInfo, subsequent calls to scnGetCodabarInfo retrieve a pointer to a data structure containing the current values.
  • Page 89: Scngetcode128Info

    s c n G e t C o d e 1 2 8 I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a CODE128INFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetCode128Info, subsequent calls to scnGetCode128Info retrieve a pointer to a data structure containing the current values.
  • Page 90: Scngetcode39Info

    s c n G e t C o d e 3 9 I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a CODE39INFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetCode39Info, subsequent calls to scnGetCode39Info retrieve a pointer to a data structure containing the current values.
  • Page 91: Scngetcode93Info

    s c n G e t C o d e 9 3 I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a CODE93INFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetCode93Info, subsequent calls to scnGetCode93Info retrieve a pointer to a data structure containing the current values.
  • Page 92: Scngetd2Of5Info

    s c n G e t D 2 o f 5 I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a D2OF5INFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetD2of5Info, subsequent calls to scnGetD2of5Info retrieve a pointer to a data structure containing the current values.
  • Page 93: Scngetgeneralinfo

    s c n G e t G e n e r a l I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a GENERALINFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetGeneralInfo, subsequent calls to scnGetGeneralInfo retrieve a pointer to a data structure containing the current values.
  • Page 94: Scngeti2Of5Info

    s c n G e t I 2 o f 5 I n f o Description LMSSCEN.LIB only. Retrieves a pointer to an I2OF5INFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetI2of5Info, subsequent calls to scnGetI2of5Info retrieve a pointer to a data structure containing the current values.
  • Page 95 s c n G e t M S I n f o Description LMSSCEN.LIB only. Retrieves a pointer to a MS structure containing the default values for each parameter. If you change and set the parameters with scnSetMS subsequent calls to scnGetMS structure containing the current values.
  • Page 96: Scngets

    s c n G e t s Description Initiates a scan and moves the scanner buffer’s contents to a programmer-defined application buffer as a null-terminated string. If the scanner buffer is empty, this function activates the scanner to let the operator scan a bar code. This function works with each scanner.
  • Page 97 Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) char *pStatus2 = NULL; char cBuffer[100]; short sStatus1 = 0; int iInput = 0; sStatus1 = scnOpenScanner(); if (sStatus1 == -2) printf("Scanner open error-- %d", sStatus1); else printf("Press trigger to\nscan...\n"); iInput = _getch(); if (iInput == 0) iInput = _getch();...
  • Page 98: Scngetscaninfo

    s c n G e t S c a n I n f o Description Retrieves a pointer to a SCANINFO data structure containing the default values for each parameter. If you change and set the parameters with scnSetScanInfo, subsequent calls to scnGetScanInfo retrieve a pointer to a data structure containing the current values.
  • Page 99: Scngetscanneddata

    This buffer must be one byte longer than the largest string that you may scan. Return Values No data available. Checksum, time-out, or communications error. Decoding fault. The scanner scanned the bar code, but the printer could not decode it. Scanner is disabled. complete. Function Reference 4-63...
  • Page 100 > 0 The type of bar code retrieved. The following values can be returned when you use either library: DCDE_C39 DCDE_CBAR DCDE_C128 DCDE_I2of5 DCDE_UPCA DCDE_UPCE DCDE_EAN8 DCDE_EAN13 DCDE_UPCA_2 DCDE_UPCE_2 DCDE_EAN8_2 DCDE_EAN13_2 DCDE_UPCA_5 DCDE_UPCE_5 DCDE_EAN8_5 DCDE_EAN13_5 DCDE_MSI 4-64 Programmer’s Manual Code 39 (3 of 9 code) Codabar (2 of 7 code) Code 128 I 2 of 5 (USD-1)
  • Page 101 Example #include <stdio.h> #include <conio.h> #include "mmsultra.h" void main (void) short sStatus = 0; char cBuffer[100]; int iInput = 0; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else printf("Press trigger to\nscan...\n"); iInput = _getch(); if (iInput == 0) { iInput = _getch();...
  • Page 102: Scngetupceaninfo

    s c n G e t U P C E A N I n f o Description LMSSCEN.LIB only. Retrieves a pointer to the scanner’s default configuration for UPC and EAN bar codes. See “UPCEANINFO” in Chapter 5 to learn more about the UPCEANINFO data structure.
  • Page 103: Scnopenscanner

    s c n O p e n S c a n n e r Description Enables the scanner and sets the configuration values to the defaults. Be sure to enable the scanner only when it is already disabled. Because this function resets the configuration values to the defaults, you must configure the scanner every time you enable it.
  • Page 104 Parameters None Return Values Successful. The scanner is already enabled. No scanner is installed or the application cannot communicate with the scanner. Example See “scnCloseScanner” for an example. 4-68 Programmer’s Manual...
  • Page 105: Scnopenscannershared

    s c n O p e n S c a n n e r S h a r e d Description Enables the scanner and sets the configuration values to the defaults. Be sure to enable the scanner only when it is already disabled.
  • Page 106 Return Values Successful. The scanner is already enabled. No scanner is installed or the application cannot communicate with the scanner. Example #include <bios.h> #include <stdio.h> #include <conio.h> #include "mmsultra.h" void main(void) short sStatus = 0; unsigned uStatus = 0; int iInput = 0; static char cBuffer[200];...
  • Page 107 printf("\nScanning...\n"); iInput = getch(); if (iInput == 0x00) iInput = getch(); if (iInput == 0x85) pScan = scnGets(cBuffer); if (pScan == NULL) printf("Scanning error\n"); else spkBeep(1, 1000); printf("Scanned data:\n%s\nPress Enter...\n", &cBuffer); _getch(); uStatus = _bios_serialcom(_COM_SEND, 0, 0); printf("Comm port write\n"); printf("return status: %d\nPress Enter...", uStatus);...
  • Page 108: Scnscannerhit

    s c n S c a n n e r H i t Description Checks for data in the scanner buffer. If there is data, it returns the type of bar code the data is from. This function works with each scanner.
  • Page 109 Example #include <stdio.h> #include "mmsultra.h" void main (void) short sStatus = 0; LPSCANINFO SScnconfig; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else { sStatus = scnGetScanInfo(SScnconfig); if (sStatus != 0) printf("Scanner is disabled\n"); else { SScnconfig->uchCode39 = SCN_ENABLE; sStatus = scnSetScanInfo(SScnconfig);...
  • Page 110: Scnsetcodabarinfo

    s c n S e t C o d a b a r I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the CODABARINFO data structure. See “CODABARINFO” in Chapter 5 for a description of this data structure.
  • Page 111 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPCODABARINFO CDBconfig; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetCodabarInfo(CDBconfig); if (sStatus != 0) printf("Scanner is disabled."); else CDBconfig->uchEnable = SCN_ENABLE; CDBconfig->uchLength1 = 0;...
  • Page 112: Scnsetcode128Info

    s c n S e t C o d e 1 2 8 I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the CODE128INFO data structure. See “CODE128INFO” in Chapter 5 for a description of this data structure.
  • Page 113 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPCODE128INFO config128; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetCode128Info(config128); if (sStatus != 0) printf("Scanner is disabled."); else config128->uchEnableUSS128 = SCN_ENABLE; config128->uchEnableUCCEAN128 = SCN_DISABLE;...
  • Page 114: Scnsetcode39Info

    s c n S e t C o d e 3 9 I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the CODE39INFO data structure. See “CODE39INFO” in Chapter 5 for a description of this data structure.
  • Page 115 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPCODE39INFO config39; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetCode39Info(config39); if (sStatus != 0) printf("Scanner is disabled."); else config39->uchEnable = SCN_ENABLE; config39->uchEnableTrioptic = SCN_DISABLE;...
  • Page 116: Scnsetcode93Info

    s c n S e t C o d e 9 3 I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the CODE93INFO data structure. See “CODE93INFO” in Chapter 5 for a description of this data structure.
  • Page 117 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPCODE93INFO config93; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetCode93Info(config93); if (sStatus != 0) printf("Scanner is disabled."); else config93->uchEnable = SCN_ENABLE; config93->uchLength1 = 0;...
  • Page 118: Scnsetd2Of5Info

    s c n S e t D 2 o f 5 I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the D2OF5INFO data structure. See “D2OF5INFO” in Chapter 5 for a description of this data structure.
  • Page 119 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPD2OF5INFO D25config; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetD2of5Info(D25config); if (sStatus != 0) printf("Scanner is disabled."); else D25config->uchEnable = SCN_ENABLE; D25config->uchLength1 = 0;...
  • Page 120: Scnsetgeneralinfo

    s c n S e t G e n e r a l I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the GENERALINFO data structure. See “GENERALINFO” in Chapter 5 for a description of this data structure.
  • Page 121 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPGENERALINFO GENconfig; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetGeneralInfo(GENconfig); if (sStatus != 0) printf("Scanner is disabled."); else GENconfig->uchLaserOnTime = 40; GENconfig->uchPowerMode = 1;...
  • Page 122: Scnseti2Of5Info

    s c n S e t I 2 o f 5 I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the I2OF5INFO data structure. See “I2OF5INFO” in Chapter 5 for a description of this data structure.
  • Page 123 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPI2OF5INFO I25config; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetI2of5Info(I25config); if (sStatus != 0) printf("Scanner is disabled."); else I25config->uchEnable = SCN_ENABLE; I25config->uchLength1 = 0;...
  • Page 124 s c n S e t M S I n f o Description LMSSCEN.LIB only. Saves the scanner configuration values the application set in the MS “MS INFO” in Chapter 5 for a description of this data structure. To configure the scanner, the application: 1.
  • Page 125 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPMS INFO MSIconfig; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetMS if (sStatus != 0) printf("Scanner is disabled."); else MSIconfig->uchEnable = SCN_ENABLE; MSIconfig->uchLength1 = 0;...
  • Page 126: Scnsetscaninfo

    s c n S e t S c a n I n f o Description Saves the scanner’s configuration values the application set in the SCANINFO data structure. See “SCANINFO” in Chapter 5 for a description of this data structure. This function is invalid with LMSSCEN.LIB.
  • Page 127 Example #include <stdio.h> #include "mmsultra.h" void main(void) short sStatus = 0; LPSCANINFO SCNconfig; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); sStatus = scnGetScanInfo(SCNconfig); if (sStatus != 0) printf("Scanner is disabled"); else SCNconfig->uchCode39 = SCN_ENABLE; // Set value sStatus = scnSetScanInfo(SCNconfig);...
  • Page 128: Scnsetupceaninfo

    s c n S e t U P C E A N I n f o Description LMSSCNEN.LIB only. Saves the scanner configuration values the application set in the UPCEANINFO data structure. See “UPCEANINFO” in Chapter 5 for a description of this data structure.
  • Page 129 Example #include <stdio.h> #include "scan1223.h" #include "mmsultra.h" void main(void) short sStatus = 0; LPUPCEANINFO UEconfig; sStatus = scnOpenScanner(); if (sStatus == -2) printf("Scanner error-- %d", sStatus); else sStatus = scnGetUPCEANInfo(UEconfig); if (sStatus != 0) printf("Scanner is disabled."); else UEconfig->uchEnableUPCA = SCN_ENABLE; UEconfig->uchEnableUPCE = SCN_DISABLE;...
  • Page 130 sStatus = scnSetUPCEANInfo(UEconfig); if (sStatus != 0) printf("Scanner is disabled"); else ; /* Scan Bar Codes */ sStatus = scnCloseScanner(); 4-94 Programmer’s Manual // Save values // Disable scanner...
  • Page 131: Scntrigger

    s c n T r i g g e r Description Initiates a scan, placing the scanned data in the scanner buffer. If the LED on the keypad turns green, the scan was successful. This function works with each scanner. Call scnGetScannedData immediately after calling scnTrigger.
  • Page 132: Spkbeep

    B e e p Description Sounds the printer’s beeper for the specified duration and frequency. If you pass invalid values in either parameter, the beeper does not sound. Syntax void far spkBeep(unsigned char uchDuration, Parameters uchDuration usFrequency...
  • Page 133: Sysgetbiosversion

    s y s G e t B I O S V e r s i o n Description Retrieves the BIOS version and build date. The date string’s format is mm ss format is , where minor version, and Syntax int far sysGetBIOSVersion(unsigned char far *lpszVersion, Parameters lpszVersion...
  • Page 134 iStatus = sysGetBIOSVersion(ucVersion, ucDate); if (iStatus != 0) printf("BIOS Version retrieval failed."); else vidScroll(0, 0, 3, 11, 0, 0x07); vidPutCursor(0, 0, 0); printf(" BIOS printf("Version is %s\n", ucVersion); printf("Date is %s", ucDate); 4-98 Programmer’s Manual // Display results "); // Get info...
  • Page 135: Vidbacklighton

    v i d B a c k L i g h t O n Description Turns the LCD backlight on or off. Syntax void far vidBackLightOn(short sOn); Parameters The state to change the backlight to. Values are (for Off). Return Values None Example #include <conio.h>...
  • Page 136: Vidgetstate

    v i d G e t S t a t e Description Retrieves the current video mode as defined in vidSetMode. Syntax unsigned short far vidGetState(short far* lpsColCnt, Parameters lpsColCnt A variable pointer to the number of character columns. lpsPage A variable pointer to the current active display page.
  • Page 137: Vidputcursor

    v i d P u t C u r s o r Description Moves the cursor for the specified display page to the specified row and column. Syntax void far vidPutCursor(unsigned short usRow, Parameters usRow Row. For 4-row printers, values are printers, values are usCol Column.
  • Page 138: Vidputstr

    v i d P u t S t r Description Writes a string of ASCII characters with an attribute at the specified display page’s current cursor location. The string overwrites the characters in the affected positions. This function does not move the cursor. Use vidPutCursor to move If the application writes to a display page other than the current one, the written string does not appear until the application sets that page as the current one with vidSetPage.
  • Page 139 Example #include "mmsultra.h" void main(void) vidSetPage(0); vidScroll(0, 0, 7, 19, 0, 0x07); vidPutCursor(0, 0, 0); vidPutStr("REVERSE", 0x70, 0); vidPutCursor(1, 0, 0); vidPutStr("NORMAL", 0x07, 0); // Set the page // Clear the screen // Move the cursor // Print in reverse video // Move the cursor // Print in Normal video Function Reference 4-103...
  • Page 140: Vidreadca

    v i d R e a d C A Description Reads a character and attribute from the current cursor location for the specified display page. Syntax void far vidReadCA(unsigned char far* lpuchChr, Parameters lpuchChr A variable pointer to the character. lpuchAttr A variable pointer to the character’s attribute.
  • Page 141 printf("Character read is %c\n", ucCharacter); if (ucAttribute == 0x07) printf("Attribute read is\nnormal"); else printf("Attribute read is\nreverse"); // Display results Function Reference 4-105...
  • Page 142: Vidreadcursor

    v i d R e a d C u r s o r Description Retrieves the specified display page’s current cursor location. Syntax void far vidReadCursor(unsigned short far* lpusRow, Parameters lpusRow A variable pointer to the row. For 4-row printers, values are lpusCol A variable pointer to the column.
  • Page 143: Vidscroll

    v i d S c r o l l Description Does either of the following to the current display page: ♦ Sets the display to ASCII space characters in either normal or reverse video. ♦ Scrolls the specified window up or down by a specified number of lines.
  • Page 144 Return Values None Example #include <stdio.h> #include <conio.h> #include "mmsultra.h" void main(void) printf("Press Enter to\nclear the display\nin reverse video."); _getch(); vidScroll(0, 0, 3, 11, 0, 0x70); 4-108 Programmer’s Manual // Prompt user // Read Enter // Clear scr. in rev. video...
  • Page 145: Vidsetcursortype

    0 to 7 (from top to bottom). To define a cursor style, specify a range of consecutive lines. On printers with the 4-row printer, there is a gap between lines 31 and 32, where nothing displays. This gap causes a solid block cursor to look fine on the first three rows, but not on the fourth row.
  • Page 146 Example #include <conio.h> #include <stdio.h> #include "mmsultra.h" void main(void) int cStyle = 32; printf("Choose cursor type:\nA (block)\nB (underscore)"); cStyle = _getch(); switch(cStyle) case 'A': vidSetCursorType(0, 6); break; case 'B': vidSetCursorType(7, 7); break; default: printf("\nInvalid input"); 4-110 Programmer’s Manual // Cursor style // Prompt user // Get input // Take action...
  • Page 147: Vidsetmode

    v i d S e t M o d e Description Sets the video mode and clears the screen for the current display page. Syntax void far vidSetMode(unsigned short usMode); Parameters usMode The video mode. Enter Return Values None Example See “pclCalibrate”...
  • Page 148: Vidsetpage

    v i d S e t P a g e Description Switches to the specified display page and displays it. Switching between pages does not affect their contents. To ensure the ♦ application begins on the same page every time, use this function to set the display page at the application’s beginning.
  • Page 149 void main(void) vidSetPage(0); vidScroll(0, 0, 3, 11, 0, 0x07); vidSetPage(1); vidScroll(0, 0, 3, 11, 0, 0x07); vidPutCursor(0, 0, 0); vidPutStr("This is page 0", 0x70, 0); vidPutCursor(0, 0, 1); vidPutStr("This is page 1", 0x70, 1); printf("\nPress any key to\nswitch to page 0"); _getch();...
  • Page 150: Vidwritec

    v i d W r i t e C Description Writes an ASCII character at the specified display page’s current cursor location, overwriting any character that may already be there, but keeping the attribute. After calling this function, call vidPutCursor to move the cursor to a new position. If the application writes to a display page other than the current one, the written string does not appear until the application sets that page as the current one with vidSetPage.
  • Page 151 Example #include "mmsultra.h" void main(void) int iCharacter = 42; vidSetPage(0); vidScroll(0, 0, 7, 19, 0, 0x07); vidPutCursor(0, 0, 0); vidWriteC(iCharacter, 5, 0); // An asterisk // Set page // Clear screen // Position cursor // Write character Function Reference 4-115...
  • Page 152: Vidwriteca

    v i d W r i t e C A Description Writes a character with an attribute at the specified display page’s current cursor location, overwriting any character (and attribute) that may already be there. After calling this function, call vidPutCursor to move the cursor to a new position.
  • Page 153 sPage The display page. For 4-row printers, values are . For 8-row printers, values are Return Values None Example #include "mmsultra.h" void main(void) int iCharacter = 42; vidSetPage(0); vidScroll(0, 0, 7, 19, 0, 0x07); vidPutCursor(0, 0, 0); vidWriteCA(iCharacter, 0x70, 5, 0); // An asterisk // Set page // Clear screen...
  • Page 154 4-118 Programmer’s Manual...
  • Page 155: Data Structure Reference

    D ATA S T R U C T U R E R E F E R E N C E Certain functions described in the last chapter require the application to use certain data structures. This chapter describes these structures. It lists them alphabetically. Following is an overview.
  • Page 156: Codabarinfo

    C O D A B A R I N F O The CODABARINFO data structure contains scanner configuration information about Codabar bar codes. To read these values, applications call scnGetCodabarInfo; to set these values, they call scnSetCodabarInfo. typedef struct _CodabarInfo unsigned char uchEnable;...
  • Page 157 Field uchEnableCLSIEdit uchEnableNOTISEdit Description Enable/disable the ability to strip the start and stop characters from 14-character Codabar bar codes and insert a space after the first, fifth, and tenth characters. Default: SCN_DISABLE Enable/disable the ability to strip the start and stop characters from Codabar bar codes.
  • Page 158: Code128Info

    C O D E 1 2 8 I N F O The CODE128INFO data structure contains scanner configuration information about Code 128 bar codes. To read these values, applications call scnGetCode128Info; to set these values, they call scnSetCode128Info. typedef struct _Code128Info unsigned char uchEnableUSS128;...
  • Page 159: Code39Info

    C O D E 3 9 I N F O The CODE39INFO data structure contains scanner configuration information about Code 39 bar codes. To read these values, applications call scnGetCode39Info; to set these values, they call scnSetCode39Info. typedef struct _Code39Info unsigned char uchEnable;...
  • Page 160 Field uchEnableC32Prefix uchLength1 uchLength2 uchVerifyCheckDigit uchXmitCheckDigit uchEnableFullASCII Programmer’s Manual Description Enable/disable the ability to add “A” as a prefix to all Code 32 bar codes. You must enable uchCvtC39toC32 when enabling this parameter. Default: SCN_DISABLE Specifies lengths (including check digits) for Code 39 bar codes.
  • Page 161: Code93Info

    C O D E 9 3 I N F O The CODE93INFO data structure contains scanner configuration information about Code 93 bar codes. To read these values, applications call scnGetCode93Info; to set these values, they call scnSetCode93Info. typedef struct _Code93Info unsigned char uchEnable;...
  • Page 162: D2Of5Info

    D 2 O F 5 I N F O The D2OF5INFO data structure contains scanner configuration information about D 2 of 5 bar codes. To read these values, applications call scnGetD2of5Info; to set these values, they call scnSetD2of5Info. typedef struct _D2of5Info unsigned char uchEnable;...
  • Page 163: Generalinfo

    G E N E R A L I N F O The GENERALINFO data structure contains general scanner configuration information. To read these values, applications call scnGetGeneralInfo; to set these values, they call scnSetGeneralInfo. typedef struct _GeneralInfo unsigned char uchLaserOnTime; unsigned char uchPowerMode;...
  • Page 164: Scan Security Levels

    Field uchSameSymbolTMO uchLinearCodeSecur uchBiDirRedun Scan Security Levels The following table describes the security levels used with the uchLinearCodeSecur Level Number 5-10 Programmer’s Manual Description The minimum time that must elapse between scans of the same bar code (in increments of .1 seconds). You must set uchTriggerMode to 1 when setting this parameter.
  • Page 165 Level Number Description Bar code types other than the following (or these bar codes, as long as they do not meet the length specification) must be scanned successfully twice: D 2 of 5 I 2 of 5 All bar code types of all lengths must be scanned successfully three times.
  • Page 166: I2Of5Info

    I 2 O F 5 I N F O The I2OF5INFO data structure contains scanner configuration information about I 2 of 5 bar codes. To read these values, applications call scnGetI2of5Info; to set these values, they call scnSetI2of5Info. typedef struct _I2of5Info unsigned char uchEnable;...
  • Page 167: Default: Scn_Disable

    Field uchChkDgtAlgorithm uchXmitCheckDigit uchCvtI2of5toEAN13 Description Specifies whether the scanner should check the integrity of I 2 of 5 bar codes to ensure they comply with either the Uniform Symbology Specification (USS) or Optical Product Code Council (OPCC) algorithms. Values are: Do not check the integrity Check the integrity against the USS algorithm...
  • Page 168: Msiinfo

    M S I I N F O The MSIINFO data structure contains scanner configuration information about MSI bar codes. To read these values, applications call scnGetMSIInfo; to set these values, they call scnSetMSIInfo. typedef struct _MSIInfo unsigned char uchEnable; unsigned char uchLength1; unsigned char uchLength2;...
  • Page 169 Field uchCheckDigits uchXmitCheckDigit uchChkDgtAlgorithm Description The number of check digits to use with the bar codes. Values are: One check digit Two check digits. For this value, you must also set uchChkDgtAlgorithm. Default: 0 Enable/disable the requirement to transmit data with the check digit. Default: SCN_DISABLE Specifies the check digit algorithm to use.
  • Page 170: Upceaninfo

    U P C E A N I N F O The UPCEANINFO data structure contains scanner configuration information about UPC and EAN bar codes. To read these values, applications call scnGetUPCEANInfo; to set these values, they call scnSetUPCEANInfo. typedef struct _UPCEANInfo unsigned char uchEnableUPCA;...
  • Page 171 Field uchEnableUPCE1 uchEnableEAN8 uchEnableEAN13 uchEnableBookEAN uchEnableSupps Description Enable/disable the ability to scan UPCE1 bar codes. Default: SCN_DISABLE Enable/disable the ability to scan EAN8 bar codes. Default: SCN_ENABLE Enable/disable the ability to scan EAN13 bar codes. Default: SCN_ENABLE Enable/disable the ability to scan Bookland EAN bar codes.
  • Page 172 Field uchEnableSuppRedun uchXmitUPCAChkDgt uchXmitUPCEChkDgt uchXmitUPCE1ChkDgt uchUPCAPreamble 5-18 Programmer’s Manual Description The number of times to scan bar codes without supplementals before transmission. Five or more is recommended when scanning a mix of UPC/EAN bar codes with and without supplementals. You must set uchEnableSupps is set to 2 when setting this parameter.
  • Page 173 Field uchUPCEPreamble uchUPCE1Preamble uchCvtUPCEtoUPCA uchCvtUPCE1toUPCA uchEAN8ZeroExtend Description Specifies how to transmit lead-in characters for UPCE0 bar codes. Values are: Do not transmit Transmit system character Transmit system character and country code Default: 1 Specifies how to transmit lead-in characters for UPCE1 bar codes. Values are: Do not transmit Transmit system character...
  • Page 174: Scan Security Levels

    Field uchCvtEAN8toEAN13 uchSecurityLevel uchEnableCouponCode Scan Security Levels The security level specifies how aggressive the scanner works during a scan. With a low bar code quality, the scanner must work more aggressively, and vice versa. Choose the minimum security level you need, according to the following guidelines: Level Description Provides security sufficient for bar codes that meet...
  • Page 175: Programming Techniques

    A batch packet starts a print job, which makes an asynchronous call to the Print subsystem. After submitting a print job, the application should call pclStatus in a loop, waiting until the printer becomes free. See “Pausing While Printing” for more information. Packet...
  • Page 176: Printing Multiple Labels

    5. Close the Print subsystem with pclClose. Printing Single Labels To print single labels, send a format and a batch (with a quantity of 1) to the printer. SAMPLE1.C in the Samples sub- directory illustrates printing single labels. Printing Multiple Labels An application can print multiple labels in a strip or in a loop.
  • Page 177: Quantity

    In non- peel mode, the printer feeds the supply through the printer in a continuous strip. In a print loop, the printer may or may not be in peel mode. The mode you want depends on how you load the supplies in the printer.
  • Page 178: Loading Multiple Packets Together

    P a u s i n g W h i l e P r i n t i n g After submitting a packet that prints labels, an application should pause until the printer becomes free. To check if the printer is busy, the application calls pclStatus. By calling pclStatus in a loop, the application pauses until the printer finishes.
  • Page 179: Building Packets Dynamically

    SAMPLE3.C in the Samples sub-directory illustrates building packets dynamically. U s i n g t h e S c a n n e r An application uses the printer’s scanner to read bar codes as follows: 1. Enable the scanner with scnScannerOpen or scnOpenScannerShared.
  • Page 180 For example, after a trigger pull, the application may have the printer beep. Without such feedback, most users keep pulling, not realizing the pull has registered. Programmer’s Manual...
  • Page 181: Using Userve And Uclient

    UClient and UServe software that runs on the PC and printer, respectively. To establish this connection: 1. Connect the printer and PC with a cable (part number 124054). 2. Turn on the printer and type USERVE at the DOS prompt. You will see: USERVE 1.04 READY...
  • Page 182 4. Select You set the communication defaults on this screen. 5. Select the PC communications port you are using and the baud rate for the printer and PC to use. Then, click OK. 6. Select Open from the Connection menu to open the connection between the two units.
  • Page 183: Establishing A Pc/Printer Connection

    A Note About Connections For a connection to be open, both sides (printer and PC) have to be ready. If only one side, or neither side, is ready, the connection is closed. For the printer to be ready, UServe must be running (step 2, in ”Establishing a PC/Printer Connection”).
  • Page 184: Example File Copy

    3. Enter commands, one at a time, at the UClient prompt to copy files to the printer. See ”Example File Copy” to get an idea of how a file copy might work. UClient Commands” explains these commands in detail. Close 4.
  • Page 185: Uclient Commands

    Command Description close Closes the communication connection between the PC and printer by taking the PC out of a ready state. Copies a file from the printer to the PC. help Displays a list of available commands or help information about a specific command.
  • Page 186: Syntax Conventions

    Specifies the port to use on the PC for communication between it and the printer (overriding the default set from UClient’s Connection menu). settimeout Sets the length of time for the PC to wait for the printer to respond to a command. Changes the directory on the printer. udel Deletes a file on the printer.
  • Page 187: Close

    Description Closes the connection between the PC and printer by taking the PC out of a ready state. UServe stays running and the printer remains ready for communications. Syntax close Parameters None Example close closes the connection between the printer and the PC displays “Connection Closed to Ultra”...
  • Page 188: Help

    Example get autoexec.bat copies autoexec.bat from the printer to the PC, giving the file the same name on the PC. The PC displays something similar to the following: Getting File: autoexec.bat [Unknown Size] Bytes Received: 537 Complete h e l p...
  • Page 189: Ldel

    l c d Description Changes the directory on the PC. Syntax lcd directory Parameters directory The directory to change to. This value can be: ♦ a path to a particular directory. ♦ The name of a subdirectory. ♦ .. (indicating one directory higher than the current one) Example lcd c:\backups changes the current directory to c:\backups and displays this path to...
  • Page 190: Ldir

    l d i r Description Lists details about files and/or directories on the PC, as specified. Details include date and time of creation (or last update) and size. Syntax ldir [filedirspec] Parameters filedirspec The name (and optionally, the path) of a file or directory.
  • Page 191 l m d Description Creates a directory on the PC. Syntax lmd directory Parameters directory The name (and optionally, the path) of a new directory. If the directory already exists, an error occurs. Example lmd tc6035pm creates a directory named tc6035pm on the PC and displays directory: tc6035pm to confirm it.
  • Page 192: Open

    PC. For example, c:\projects\adk. o p e n Description Puts the PC in a communications ready state. If the printer is ready (UServe is running), the connection between the printer and the PC opens. Syntax...
  • Page 193: Ping

    Description Copies a file from the PC to the printer. A PC/printer connection must be in place before using this command. NOTE: If a file by the same name already exists, it will overwrite the file without warning.
  • Page 194: Puttrueffs

    PC to the printer, giving it the same name on the printer. It also displays a listing of the file name and its size, and a count of the bytes sent so far as the copy occurs. When the copy finishes, “Complete”...
  • Page 195: Reboot

    Example puttrueffs flash.bin copies flash.bin from the PC to the printer, displaying the file name and status of the command as it does so. q u i t Description Exits UClient. Syntax quit Parameters None Example quit Exits the program and returns PC control to Windows.
  • Page 196: Setbaud

    Description Sets the baud rate for communications between the printer and the PC (overriding the default set from UClient’s Connection menu.). Syntax setbaud rate Parameters rate The baud rate. Values are: 19200 38400...
  • Page 197: Settimeout

    Description Sets the length of time for the PC to wait for the printer to respond to a command. The connection between the printer and PC does not have to be active when entering this command.
  • Page 198: Udel

    Description Deletes a file on the printer. Wild cards are not valid with this command. Syntax udel filename Parameters filename The name of the file to delete. Example udel autoexec.bat deletes autoexec.bat and displays confirming the deletion.
  • Page 199: Udiskfree

    U.EXE TP.EXE UTIL CONFIG.SYS u d i s k f r e e Description Displays the size of a printer drive and the amount of available space it has. Syntax udiskfree disk Parameters disk The drive to query for space and size.
  • Page 200 Drive = C Total Size = 1462272 bytes Available = 659456 bytes u m d Description Creates a directory on the printer. If the directory already exists, an error occurs. Syntax umd directory Parameters directory The name (and optionally, the path) of the new directory.
  • Page 201: Urun

    Description Deletes a directory on the printer. If the directory does not exist, an error occurs. Syntax urd directory Parameters directory A directory name (and optionally, the path). Example urd backups deletes the backups subdirectory from the current directory.
  • Page 202: Uview

    Example urun diag runs the printer’s diagnostics program as an offshoot task from UServe. u v i e w Description Displays a file’s contents on the printer. Syntax uview file Parameters file The name (and optionally, the path) of the file to display.
  • Page 203 Example displays the path to the current directory on the printer. For example, D:\DATA T r o u b l e s h o o t i n g Consult the following table if any errors occur while you are using UClient and UServe.
  • Page 204 Verify that the directory you specified exists and retry the command. There is not enough space on the PC to save a file received from the printer. Free some space and retry the command. Verify that a valid PC/printer connection exists. If so, increase the length of the timeout.
  • Page 205 You specified file names with a wild card, and there are none fitting the specification. Verify the file names and spelling and retry the command. UServe is not running on the printer. Start it and establish a PC/printer connection. Verify that a valid PC/printer connection exists and retry the command.
  • Page 206 7-26 Programmer’s Manual Solution Call Technical Support at the phone number on the back of this manual. The printer timed out before it could complete the command. Increase the length of the timeout with the settimeout command and retry the command that timed out.
  • Page 207: Sample Applications

    S A M P L E A P P L I C AT I O N S The SDK contains several sample applications for both printers for you to study as you write your own applications. These samples are located in the SDK’s samples sub-directory. This appendix describes these samples.
  • Page 208 S a m p l e 1 Function Prints with the trigger. Algorithm Initialize the Print subsystem without allocating font storage memory. Loads a format packet. Performs the following until the operator presses the trigger (to print), b (to break out of the loop), or f+0 to calibrate supplies.
  • Page 209: Sample 3

    5. Waits until the label prints by checking the status repeatedly until it returns something other than “busy.” 6. Closes the Print subsystem. S a m p l e 3 Function Prints a strip of labels. Algorithm 1. Initializes the Print subsystem without allocating font storage memory.
  • Page 210 S a m p l e 4 Function Prints using fonts and formats loaded with pclOpen. Algorithm 1. Initializes the Print subsystem. 2. Loads FORMATS.PCL. This file contains an MPCL format packet. 3. Performs the following until the operator presses the trigger (to print), b (to break out of the loop), or f+0 to calibrate supplies.
  • Page 211: Sample 6

    S a m p l e 6 Function Scans and prints. Algorithm 1. Initializes the Print subsystem without allocating font storage memory. 2. Loads a format. 3. Enables the scanner. 4. Performs the following until the operator presses the trigger, b (to break out of the loop), or f+0 to calibrate supplies.
  • Page 212 4. Sets the scanner to transmit the System characters and country code with UPCA bar codes. 5. Performs the following until the operator to presses the trigger, b (to break out of the loop), or f+0 to calibrate supplies. A. Initiates a scan. B.
  • Page 213: Glossary

    Display Page Any of four virtual pages that the printer can display (one at a time) on the physical display. An application can write data to a display page behind-the-scenes, and display it when ready.
  • Page 214 The buffer internal to the scanner that contains the bar code data immediately after scanning. The type of supplies you load in the printer. They can be paper, fax, or synthetic. The media that the printer prints on. For example, it can print labels or tags.
  • Page 215 I N D E X 1223 scanner configuration CODABARINFO data structure, 5-2 CODE128INFO data structure, 5-4 CODE39INFO data structure, 5-5, 5-7 D2OF5INFO data structure, 5-8 for Codabar bar codes, 4-74 for Code 128 bar codes, 4-76 for Code 39 bar codes, 4-78 for Code 93 bar codes, 4-80 for D 2 of 5 bar codes, 4-82 for I 2 of 5 bar codes, 4-86...
  • Page 216 AUTOEXEC.BAT bypassing, 2-12 receiving prompts for each line, 2-12 backlight, adjusting, 4-99 backlight, turning on or off, 2-3 bar code type last scanned, retrieving, 4-46 bar codes Codabar, 4-52, 4-74, 5-2 Code 128, 4-53, 4-76, 5-4 Code 39, 4-54, 4-78, 5-5 Code 93, 4-55, 4-80, 5-7 D 2 of 5, 4-56, 4-82, 5-8 EAN, 5-16...
  • Page 217 closing Print subsystem, 4-21 Codabar bar codes configuration data structure, 5-2 retrieving configuration values, 4-52 setting configuration values, 4-74 CODABARINFO data structure, 5-2 Code 128 bar codes configuration data structure, 5-4 retrieving configuration values, 4-53 setting configuration values, 4-76 Code 39 bar codes configuration data structure, 5-5 retrieving configuration values, 4-54 setting configuration values, 4-78...
  • Page 218 configuring 1223 scanner for Codabar bar codes, 4-74 1223 scanner for Code 128 bar codes, 4-76 1223 scanner for Code 39 bar codes, 4-78 1223 scanner for Code 93 bar codes, 4-80 1223 scanner for D 2 of 5 bar codes, 4-82 1223 scanner for I 2 of 5 bar codes, 4-86...
  • Page 219 4-67 scanner while sharing the serial port, 4-69 end users, training, 3-5 errors clearing for motion control, 4-20 retrieving messages, 4-28 features, of printer, 2-1 feeding labels, 4-22 fonts descriptions, 2-7 function key mode activating, 4-9 deactivating, 4-2 functions...
  • Page 220 kbdGetMode, 4-3 kbdRestoreMode, 4-4 kbdSetAlpha, 4-6 kbdSetCaps, 4-8 kbdSetFunct, 4-9 kbdSetNormal, 4-11 pclBatteryOkToPrint, 4-12 pclCalibrate, 4-13 pclCalibratePaper, 4-18 pclClearError, 4-20 pclClose, 4-21 pclFeed, 4-22 pclGetBatteryLevel, 4-24 pclGetBlackMarkSensor, 4-26 pclGetErrorMsg, 4-28 pclGetOnDemandSensor, 4-30 pclGetSupplyType, 4-33 pclInit, 4-35 pclOpen, 4-37 pclPaperInfo, 4-38 pclPaperSetup, 4-39 pclStatus, 4-42 pclWrite, 4-43...
  • Page 221 vidBackLightOff, 4-99 vidGetState, 4-100 vidPutCursor, 4-101 vidPutStr, 4-102 vidReadCA, 4-104 vidReadCursor, 4-106 vidScroll, 4-107 vidSetCursorType, 4-109 vidSetMode, 4-111 vidSetPage, 4-112 vidWriteC, 4-114 vidWriteCA, 4-116 GENERALINFO data structure, 5-9 get command, 7-7 hardware requirements, 1-2 help command, 7-8 I 2 of 5 bar codes configuration data structure, 5-12 retrieving configuration values, 4-58 setting configuration values, 4-86...
  • Page 222: Pausing While Printing

    ldir command, 7-10 libraries, SDK, 3-4 linking applications, 3-4 lmd command, 7-11 loading MPCLII packets, 4-37 multiple packets together, 6-4 lower-case alpha mode, activating, 4-6 lrd command, 7-11 lwd command, 7-12 memory description, 2-5 motion control errors, clearing, 4-20 MPCLII packets building dynamically, 6-5 creating, 3-2 loading from a file, 4-37...
  • Page 223 7-13 Print subsystem closing, 4-21 retrieving status of, 4-42 writing MPCLII packets to, 4-43 Print subsystem, initializing with normal memory, 4-35 printer features, 2-1 printing multiple labels, 6-2 pausing while, 6-4 single labels, 6-2 programming techniques, 6-1 put command, 7-13...
  • Page 224 1223 scanner Code 93 bar code configuration, 4-55 1223 scanner D 2 of 5 bar code configuration, 4-56 1223 scanner general configuration, 4-57 1223 scanner I 2 of 5 bar code configuration, 4-58 1223 scanner MSI bar code configuration, 4-59 1223 scanner UPC/EAN bar code configuration, 4-66 BIOS version, 4-97...
  • Page 225 scnGetCodabarInfo function, 4-52 scnGetCode128Info function, 4-53 scnGetCode39Info function, 4-54 scnGetCode93Info function, 4-55 scnGetD2of5Info function, 4-56 scnGetGeneralInfo function, 4-57 scnGetI2of5 function, 4-58 scnGetMSIInfo function, 4-59 scnGets function, 4-60 scnGetScanInfo function, 4-62 scnGetScannedData function, 4-63 scnGetUPCEANInfo function, 4-66 scnOpenScanner function, 4-67 scnOpenScannerShared function, 4-69 scnScannerHit function, 4-72 scnSetCodabarInfo function, 4-74 scnSetCode128Info function, 4-76...
  • Page 226: Troubleshooting

    techniques for programming, 6-1 testing applications away from PC, 3-4 training the end users, 3-5 trigger pulls, reading, 6-5 troubleshooting, uclient/userve, 7-23 turning backlight on or off, 2-3 display on or off, 2-3 ucd command, 7-17 uclient, 7-1 uclient commands, 7-5 uclient/userve troubleshooting, 7-23 udel command, 7-18 udir command, 7-18...
  • Page 227 Windows 95 notes, 2-15 writing applications, 3-2 characters and attributes at current cursor location, 4-116 characters at current cursor location, 4-114 MPCLII packets to Print subsystem, 4-43 strings and attributes at current cursor location, 4-102 Index...
  • Page 228 14 Index...

This manual is also suitable for:

Monarch pathfinder ultra gold 6037ex

Table of Contents