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.
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 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...
♦ 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.
♦ 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 ♦...
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...
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.
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.
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.
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...
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.
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 –...
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.
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.
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.
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.
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.
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.
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 ).
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.
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.
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...
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.
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.
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.
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.
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...
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...
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...
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...
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...
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...
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();...
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...
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.
(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.
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");...
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");...
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");...
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...
.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.
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...
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);...
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);...
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);...
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...
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();...
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...
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...
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.
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.
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.
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.
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.
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.
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.
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();...
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.
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();...
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.
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...
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];...
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);...
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;...
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;...
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;...
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;...
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;...
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;...
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;...
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);...
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...
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.
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...
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...
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>...
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.
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.
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...
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...
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.
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...
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...
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”...
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.
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...
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...
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.
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.
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;...
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.
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;...
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;...
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;...
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.
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;...
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...
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.
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...
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...
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...
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.
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.
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.
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...
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.
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”).
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.
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.
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.
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”...
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...
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...
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.
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...
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.
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”...
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.
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...
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.
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.
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.
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.
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.
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.
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.
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.
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...
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...
Need help?
Do you have a question about the Gold 6037EX and is the answer not in the manual?
Questions and answers