Home

Paxar Gold 6037EX User's Manual

image

Contents

1. Lists details about files and or directories on the printer as specified Details include date and time of creation or last update and size Syntax udir filedirspec Parameters filedirspec A file or directory name and optionally the path The default is the current directory 7 18 Programmer s Manual Example udir c displays a list of files in the c root directory Below is an example 01 02 1980 00 17 18 lt DIR gt de 01 02 1980 00 17 18 lt DIR gt IBMBIO COM 04 03 2003 10 23 16 63645 IBMDOS COM 04 03 2003 10 23 16 77 COMMAND COM 04 01 2003 07 10 00 45742 DOS 01 02 1980 00 17 22 lt DIR gt AUTOEXEC BAT 03 28 2003 08 52 44 537 APP EXE 04 04 2003 10 14 56 87219 DEBUG EXE 05 31 1994 06 22 00 15718 DIAG EXE 04 03 2003 15 16 36 98782 U EXE 01 04 2003 08 17 56 65367 TP EXE 04 03 2003 15 12 16 6859 UTIL 02 17 1980 22 22 58 lt DIR gt CONFIG SYS 03 28 2003 08 46 50 602 udiskfree 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 cand dare the possible values A colon is unnecessary after the letter Using UServe and UClient 7 19 Example udiskfree c displays something like the following Drive C Total Size 1462272 bytes Available 659456 bytes umd Description Creates a directory on the printer If the directory already exists an error occurs Syntax umd direct
2. in Chapter 5 for a description of this data structure To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetl2of5Info 3 Sets the values in the I2OF5INFO data structure 4 Calls scnSetl2OF5Info When the application disables the scanner the configuration values go back to the defaults Syntax short far scnSetl2of5Info LPIZOFS5INFO Ipri2of5Info Parameters lpri2of5Info A pointer to an IZOF5INFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 86 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPIZOFSINFO 25config 12 of 5 data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get config sStatus senGetl2of5Info I25config if sStatus 0 printf Scanner is disabled else Set values I25config gt uchEnable SCN_ENABLE I25config gt uchLength 1 0 I25config gt uchLength2 0 I25config gt uchChkDgtAlgorithm 1 I25config gt uchXmitCheckDigit SCN_ENABLE I25config gt uchHCvtl2Z0f5toEAN13 SCN_DISABLE Save values sStatus senSetl2of5Info I25config if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus
3. Calibrates the supplies in the printer and gives the supply information to the Print subsystem Operators can load supplies as described in the Equipment Manual before running an application but they cannot calibrate the supplies until the application calls this function In general you should display a prompt Load your supplies for example and require the operator to press a key the trigger might be easiest prior to calling this function Do not use this function when using fax paper because it has no black mark to detect If an application uses this function it should not use pclCalibratePaper and pclPaperSetup Syntax unsigned short far pascal pclCalibrate unsigned short usStockLength unsigned short usStockWidth unsigned short usStockType LPFNSUPPLYTYPEPROMPT lofnSupplyTypePromprt LPFNSUPPLYPROMPT IpfnSupplyPrompt Function Reference 4 13 Parameters usStockLength usStockWidth usStockType The supply length in hundredths of an inch Values are 55 400 or 7 to prompt the user The supply width in hundredths of an inch Values are 720 150 200 or 7 to prompt the user The supply type Values are MMS_LOW_ENERGY Paper MMS_MEDIUM_ENERGY Fax MMS_HIGH_ENERGY Synthetic 1 Prompt User If you are using linerless supplies experiment with these values to see which one achieves the best results Ip nSupplyTypePrompt Enter 0 lofnSupplyPrompt Return Values 0 Non zero 4 14 Programm
4. If you change and set the parameters with scnSetCode93Info subsequent calls to senGetCodeg93 Info retrieve a pointer to a data structure containing the current values See CODE93INFO in Chapter 5 to learn more about the CODE9Q3INFO data structure Syntax short far scnGetCode93info LPCODE93INFO IprCode93Info Parameters lorCode93 nfo A pointer to a CODE93INFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetCode93Info for an example Function Reference 4 55 scnGetD2of5Info 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 See D2OF5INFO in Chapter 5 to learn more about the D2OF5INFO data structure Syntax short far senGetD2of5Info LPD2OF5INFO IprD2of5Info Parameters lprD2of5Info A pointer to a D2OF5INFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetD2of5Info for an example 4 56 Programmer s Manual scnGetGenerallinfo 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 scnSetGenerallnfo subsequent calls to scnGetGenerallnfo retrieve a
5. None Example include lt conio h gt include lt stdio h gt include mmsultra h 4 112 Programmer s Manual void main void vidSetPage 0 Clear page 0 vidScroll O 0 3 11 0 0x07 vidSetPage 1 Clear page 1 vidScroll 0 0 3 11 0 0x07 vidPutCursor 0 O 0 Write to page 0 vidPutStr This is page 0 0x70 0 vidPutCursor 0 0 1 Write to page 1 vidPutStr This is page 1 0x70 1 Prompt user printf nPress any key to nswitch to page 0 _getch vidSetPage 0 Switch pages printf nPress any key to end Prompt user _getch vidScroll O O 3 11 0 0x07 Clear page 0 vidSetPage 1 Clear page 1 vidScroll 0 0 3 11 0 0x07 vidSetPage 0 Set to page 0 Function Reference 4 113 vidWriteC 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 Strings written to the current page appear immediately To write a character and attribute use vidWriteCA Syntax void far vidWriteC unsigned char uchC hr short sCount short sPage Parameters uchChr The ASCII chara
6. rrocramumers Tia IP OS al AMICS Pathfinder Ultra Manua MaL Printer i sent alo Stat tus atch ene 1 atch a A BT a Si 4 DOZ Ee aen AN wi AS Wa w PAXA We Make Your Sales Work TC6037EXPM Rev AA 8 03 Printed in the U S A 2003 Paxar Americas Inc All rights reserved 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 Any update will be incorporated in a later edition of this manual 2003 Paxar Americas Inc All rights reserved No part of this publication may be reproduced transmitted stored in a retrieval system or translated into any language in any form by any means without prior written permission of Paxar Americas Inc WARNING This equipment has been tested and found to comply with the limits for a Class A digital device pursuant to Part 15 of the FCC Rules These limits are designed to provide reasonable protection against harmful interference when the equipment is operated ina commercial environment This equipment generates uses and can radiate radio frequency energy and if not installed and used in accordance with the instruct
7. 4 102 vidReadCA function 4 104 vidReadCursor function 4 106 vidScroll function 4 107 vidSetCursorType function 4 109 vidSetMode function 4 111 vidSetPage function 4 112 vidWriteC function 4 114 vidWriteCA function 4 116 Ww 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 13 14 Index For supplies service or assistance call toll free 1 800 543 6650 USA 1 800 363 7525 Canada 44 1279 786777 UK 45 14 67 00 France 49 5731 78060 Germany 34 93 746 43 10 Spain 01 800 300 72927 Mexico 55 47 338 2396 Brazil 61 2 9647 1833 Australia 852 2328 9949 Hong Kong 94 1 46500 Sri Lanka www paxar com
8. a sStatus sStatus scnCloseScanner Disable scanner Function Reference 4 73 scnSetCodabarIinfo 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetCodabarInfo 3 Sets the values in the CODABARINFO data structure 4 Calls scnSetCodabarInfo When the application disables the scanner the configuration values return to the defaults Syntax short far scnSetCodabarinfo LPCODABARINFO IprCodabarlnfo Parameters lorCodabarInfo A pointer to a CODABARINFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 74 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPCODABARINFO CDBconfig Codabar data struct sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get configuration sStatus scnGetCodabarlinfo CDBconfig if sStatus 0 printf Scanner is disabled else Set values CDBconfig gt uchEnable SCN_ENABLE CDBconfig gt uchLength1 0 CDBconfig gt uchLength2 0 CDBcon
9. short sCols sPages sKey for loop doing clear screen vidSetMode vidGetState amp sCols sPages printf Enter Stock Type n 0 2 n display prompt sKey __getch get key if sKey 0 if extended key _getch clear it out else if sKey gt 0 amp amp sKey lt 2 if valid type break stop prompting IpusPaperType unsigned short sKey save the setting return 0 return success 4 16 Programmer s Manual Calibration callback function to always return constant size unsigned short far pascal StockPrompt unsigned short far IpusLeninches unsigned short far lousWidthInches IpusLeninches 200 IpusWidthinches 150 return 0 return success Function Reference 4 17 pclCalibratePaper Description Calibrates supplies in the printer Operators can load supplies as described in the Equipment Manual before running an application but they cannot calibrate the supplies until the application calls this function In general you should display a message Load your supplies for example and require the operator to press a key the trigger might be easiest prior to calling this function Do not use this function when using fax paper because it has no black mark to detect If an application uses this function and pclPaperSetup it should not use pclCalibrate Syntax unsigned short far pclCalibratePaper unsigned short far lousStoc
10. 11 0 0x07 Clear screen vidPutCursor 0 O 0 Move cursor vidReadCursor usRow 8 usColumn 0 Read position printf Row position is d usRow Display results printf nColumn position is d usColumn 4 106 Programmer s Manual vidScroll 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 The application loses any text that scrolls beyond the window s top or bottom New lines contain ASCII blank characters with the specified attribute The specified window is the entire display or part of it Syntax void far vidScroll short sTop Parameters sTop sLeft sBottom sRight sNumber uchAttr short sLeft short sBottom short sRight short sNumber unsigned char uchAttr The window s top row For 4 row printers values are 0 3 For 8 row printers values are 0 7 The window s left most column Values are 0 79 The window s bottom row For 4 row printers values are 0 3 For 8 row printers values are 0 7 The window s right most column Values are 0 79 The action If you enter O the function clears the entire display If you enter a positive number the window scrolls up that many lines If you enter a negative number the window scrolls down that many lines Attribute for the cleared area
11. 111 vidSetPage 4 112 vidWriteC 4 114 vidWriteCA 4 116 i GENERALINFO data structure 5 9 get command 7 7 H hardware requirements 1 2 help command 7 8 2 of 5 bar codes configuration data structure 5 12 retrieving configuration values 4 58 setting configuration values 4 86 120F5INFO data structure 5 12 include files 3 3 information about supplies specifying 4 13 4 39 initializing Print subsystem with normal memory 4 35 initiating scans 4 95 oe kbdCirFunct function 4 2 kbdGetMode function 4 3 kbdRestoreMode function 4 4 kbdSetAlpha function 4 6 kbdSetCaps function 4 8 kbdSetFunct function 4 9 kbdSetNormal function 4 11 keypad 2 4 restoring mode 4 4 retrieving current mode 4 3 gt labels feeding 4 22 printing multiple 6 2 printing single 6 2 reprinting 6 4 LCD adjusting backlight 4 99 utility 2 3 Icd command uclient 7 9 Idel command 7 9 Index 7 8 Index Idir command 7 10 libraries SDK 3 4 linking applications 3 4 Imd command 7 11 loading MPCLII packets 4 37 multiple packets together 6 4 lower case alpha mode activating 4 6 Ird command 7 11 lwd command 7 12 ZM 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 loading individually 4 43 loading multiple together 6 4 MSI bar codes configuration data structure 5 14 retrieving configuration values 4 59 setting
12. 39 data struct sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get config sStatus scnGetCode39Info config39 if sStatus 0 printf Scanner is disabled else Set values config39 gt uchEnable SCN_ENABLE config39 gt uchEnableTrioptic SCN_DISABLE config39 gt uchCviC39t0C32 SCN_DISABLE config39 gt uchEnableC32Prefix SCN_DISABLE config39 gt uchLengthl1 0 config39 gt uchLength2 0 config39 gt uchVerifyCheckDigit SCN_DISABLE config39 gt uchXmitCheckDigit SCN_DISABLE config39 gt uchEnableFullASCIl SCN_DISABLE Save values sStatus scnSetCode39Info config39 if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 79 senSetCode93Info 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls senGetCode93Info 3 Sets the values in the CODE93INFO data structure 4 Calls scnSetCode93iInfo When the application disables the scanner the configuration values go back to the defaults Syntax short far senSetCode93Infto LPCODE93INFO Ipr
13. 5 4 CODE39INFO data structure 5 5 CODE93INFO data structure 5 7 commands uclient 7 5 commands uclient close 7 7 get 7 7 help 7 8 Icd 7 9 Idel 7 9 Idir 7 10 Imd 7 11 Ird 7 11 Iwd 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 7 16 settimeout 7 17 ucd 7 17 udel 7 18 udir 7 18 udiskfree 7 19 umd 7 20 urd 7 21 urun 7 21 uview 7 22 uwd 7 22 compiling applications 3 3 CONFIG SYS bypassing 2 12 receiving prompts for each line 2 12 Index 3 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 2 of 5 bar codes 4 86 1223 scanner for MSI bar codes 4 88 1223 scanner for UPC EAN bar codes 4 92 1223 scanner with general information 4 84 either scanner retrieving values 4 62 setting values 4 90 contents of SDK 1 3 creating MPCLII packets 3 2 current supply type retrieving 4 33 4 Index cursor location current reading characters at 4 104 retrieving 4 106 writing characters and attributes at 4 116 writing characters at 4 114 writing strings and attributes at 4 102 cursors defining style 4 109 setting locations 4 101 m D 2 of 5 bar codes configuration data structure
14. Feedback It is recommended that in the application you include some sort of audio or visual feedback indicating that the trigger has been pulled 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 6 6 Programmer s Manual USING USERVE AND UCLIENT To prepare the printer to run an application you must copy the application s files to it from the PC To do so 1 Establish a connection between the printer and PC 2 Copy files between the units Establishing a PC Printer Connection You must establish a connection between the PC and the printer using the 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 Using UServe and UClient 7 1 3 Start UClient on the PC You will see LT as File Edit View Connection Help t B 4 a UClient gt 4 Select Properties from the Connection Menu You will see Connection Properties Communications Port com y Baud Rate 9600 ba J Attempt to Open Ultra on UClient Startup Cancel You set the communication defaults on this screen 5 Select the PC communications port you are using and the baud rate for the printer
15. and enable it immediately afterwards To avoid processing delays use scnOpenScannerShared when possible 2 Configure the scanner optional To learn how to configure the scanner see the appropriate scn functions in Chapter 4 Function Reference 3 Call various scanner functions such as scnGets 4 Close the scanner with scnCloseScanner Printer Features 2 9 Scanner Function Overview scnGets Scanner Buffer lt cncets Application Buffer Te ed scnTrigger i scnGetScannedData f scnGetch Application scnGetche Processing 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 Processing works as follows 1 Initiate the scan putting the data in the scanner buffer with either scnGets or scnTrigger 2 Either Process the data directly in the scanner buffer with scnGetch scnGetche scnGetBarCodeType or scnScannerHit Save the data in the application buffer with scnG ets continued from step 1 or scnGetScannedData The application buffer must be one byte longer than the largest string that you may scan 3 If needed process the data in the application buffer NOTE Every bar code that the SE 923 scanner is configured for delays boot up by 7 seconds This does not apply to the SE 923HS scanner 2 10 Programmer s Manual Boot Process The printer s
16. configuration values 4 88 MSIINFO data structure 5 14 N network notes 2 15 normal boot 2 11 numeric normal mode activating 4 11 ES on demand sensor retrieving state of 4 30 online passthrough 3 2 open command 7 12 options for booting 2 12 p packets MPCLII building dynamically 6 5 creating 3 2 loading from a file 4 37 loading individually 4 43 loading multiple together 6 4 pausing while printing 6 4 pclBatteryOkToPrint function 4 12 pciCalibrate function 4 13 pclCalibratePaper function 4 18 pciClearError function 4 20 pciClose function 4 21 pclFeed function 4 22 pclGetBatteryLevel function 4 24 pclGetBlackMarkSensor function 4 26 pclGetErrorMsg function 4 28 pclGetOnDemandSensor function 4 30 pclGetSupplyType function 4 33 pclTnit function 4 35 pclOpen function 4 37 pclPaperlnfo function 4 38 pclPaperSetup function 4 39 pciStatus function 4 42 pclWrite function 4 43 ping command 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 putbios command 7 14 puttrueffs command 7 14 a quit command 7 15 a reading characters from current cursor location 4 104 trigger pulls 6 5 reboot command 7 15 receiving prompts for each line in CON
17. is present with Ultra No directory was specified No File Specified No Files could be found No matching files found Open Failed Response could not be read from Ultra Request could not be sent to the Ultra Soft Reboot Failed Sum check received from the Ultra was invalid Solution Verify the syntax of the command and retry it with all of the parameters Establish a PC printer connection Verify the syntax of the command and enter a directory name where specified A file name parameter was left blank Retry the command listing a file name The file you specified in the command does not exist Verify the correct name and or spelling and retry the command 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 Verify that a valid PC printer connection exists and retry the command Verify that a valid PC printer connection exists and retry the command Verify that a valid PC printer connection exists and retry the command Using UServe and UClient 7 25 Message Supplied Buffer was too small for amount of data Ultra returned Negative response Unknown Command Unknown Drive Letter Unknown Error Error xxx 7 26
18. mark 0 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 Packet Reference Manual for more information 4 26 Programmer s Manual Example include lt conio h gt include lt stdio h gt include mmsultra h void main void PRINTINIT pConfig Print data structure unsigned short usStatus 0 Battery level short sStatus 0 Command calls status sStatus pclinit NULL Start Print subsystem if sStatus 0 printf Init Failed nError Ad usStatus else usStatus pclGetBatteryLevel Check battery if UsStatus lt 711 printf Charge your battery else usStatus pclGetBlackMarkSensor Get sensor state switch usStatus Display result case 1 printf Supplies are aligned break case 0 printf Supplies misaligned or system error break default printf Error press any key when reset _getch poclClearError pclClose Close Print subsystem Function Reference 4 27 pclGetErrorMsg 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 Many error
19. pointer to a data structure containing the current values See GENERALINFO in Chapter 5 to learn more about the GENERALINFO data structure Syntax short far scnGetGenerallnfo LPGENERALINFO lorGenerallnfo Parameters lorGeneralInfo A pointer to a GENERALINFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetGenerallnfo for an example Function Reference 4 57 scnGetl2of5Info Description LMSSCEN LIB only Retrieves a pointer to an IZOF5INFO data structure containing the default values for each parameter If you change and set the parameters with scnSetl2of5Info subsequent calls to scnGetl2of5Info retrieve a pointer to a data structure containing the current values See IZOF5INFO in Chapter 5 to learn more about the I2OF5INFO data structure Syntax short far scnGetl2of5Info LPIZOFSINFO Ipri2of5Info Parameters Ipri2of5Info A pointer to an I2OF5INFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetl2of5Info for an example 4 58 Programmer s Manual scnGetMSlinfo Description LMSSCEN LIB only Retrieves a pointer to a MSIINFO data structure containing the default values for each parameter If you change and set the parameters with scnSetMSlInfo subsequent calls to scnGetMSIInfo retrieve a pointer to a data structure containing the current values See MSIINFO in Chapter 5 to learn more about the M
20. 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 Memory The printer has 2 MB of memory Printer Features 2 5 Following is the address map for the printer 200000 180000 Free 100000 F0000 F0000 FFFFF BIOS EE000 EFFFF Disk On Chip EC000 EDFFF PCMCIA DC000 EBFFF True FFS AA000 ABFFF System Variables A8000 A9FFF Display RAM Video Data Storage A0000 80000 Free Up to A0000H DOS 500 5FF Data Area 1 for ROM BIOS 400 4FF Data Area 2 for ROM BIOS 0 3FF INT Vectors 0 2 6 Programmer s Manual Fonts 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 11 Swiss Bold 50 CG Triumvirate Bold Full Character Set 6 5 pt 1000 CG Triumvirate Bold Full Character Set 8 pt 1001 CG Triumvirate Bold Full Character Set 10 pt 1002 CG Triumvirate Bold Full Character Set 12 pt 1003 CG Triumvirate Bold Partial Character Set 18 pt 1004 CG Triumvirate Bold Partial Character Set 22 pt 1005 oo Bold Condensed Full Character Set 6 5 pt aoe Bold Condensed Fu
21. to initiate processing This chapter describes the code you write to add such common features to your application It includes code for the following features Printing Labels Pausing While Printing Loading Multiple Packets Together Building Packets Dynamically Using the Scanner Reading Trigger Pulls Audio Visual Feedback Printing Labels An application prints labels by submitting MPCL packets to the Print subsystem At a minimum the application must submit format and batch packets To submit these packets use either pclWrite or pclOpen For more information see pclWrite or pclOpen in Chapter 4 For information about MPCL packets refer to the Packet Reference Manual 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 Programming Techniques 6 1 An application can print single labels print multiple labels reprint labels No matter what printing method it uses the application must 1 Initialize the Print subsystem using pcllnit 2 Calibrate the supplies using pclCalibrate or pclCalibratePaper if using supplies other than fax paper 3 Call pclPaperSetup if pclCalibratePaper was called in the previous step 4 Print using any method listed above 5 Close the P
22. 0 Reverse video sPage The display page For 4 row printers values are 0 3 For 8 row printers values are 0 7 Return Values None Example include lt stdio h gt include mmsultra h void main void unsigned char ucCharacter 32 Character at position unsigned char ucAttribute 32 Attribute at position vidSetPage 0 Set page vidPutCursor 0 O 0 Move cursor Read char and attribute vidReadCA amp ucCharacter amp ucAttribute 0 vidScroll 0 O 7 19 O 0x07 Clear screen 4 104 Programmer s Manual Display results printf Character read is c n ucCharacter if ucAttribute 0x07 printf Attribute read isinnormal else printf Attribute read isinreverse Function Reference 4 105 vidReadCursor Description Retrieves the specified display page s current cursor location Syntax void far vidReadCursor unsigned short far IpusRow unsigned short far IpusCol short sPage Parameters pusRow A variable pointer to the row For 4 row printers values are 0 3 For 8 row printers values are 0 7 IpusCol A variable pointer to the column Values are 0 79 sPage The display page For 4 row printers values are 0 3 For 8 row printers values are 0 7 Return Values None Example include lt stdio h gt include mmsultra h void main void unsigned short usRow 0 Row position unsigned short usColumn 0 Column position vidScroll O O 3
23. 003 15 18 13 lt DIR gt ha 03 14 2003 15 18 13 lt DIR gt 9850 01 07 2003 17 34 22 lt DIR gt adkpm paf 03 14 2003 15 18 13 1931471 adkpmcv paf 03 14 2003 14 59 06 1007901 app a doc 03 14 2003 11 04 34 33792 app a pdf 03 14 2003 11 54 12 85839 cover 03 14 2003 15 08 55 lt DIR gt 7 10 Programmer s Manual Imd Description Creates a directory on the PC Syntax Imd directory Parameters directory The name and optionally the path of a new directory If the directory already exists an error occurs Example Imd tc 035pm creates a directory named tc6035pm on the PC and displays Created directory tc6035pm to confirm it Ird Description Deletes a directory on the PC Syntax Ird directory Parameters directory The name and optionally the path of a directory If the directory does not exist an error occurs Example Ird tc6035pm deletes the tc6035pm directory on the PC and displays Removed directory tc6035pm to confirm it Using UServe and UClient 7 11 Iwd Description Displays the path to the current directory on the PC Syntax Iwd Parameters None Example Iwd displays the path to the current directory on the PC For example c projects adk open 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 open commport baudrate Parameters commpor The communications por
24. 12 4 46 backlight turning on or off 2 3 bar codes e Codabar 4 52 4 74 5 2 calibrating supplies 4 13 4 18 Code 128 4 53 4 76 5 4 characters Code 39 4 54 4 78 5 5 reading at current cursor location Code 93 4 55 4 80 5 7 4 104 D 2 of 5 4 56 4 82 5 8 retrieving from scanner with echoing 4 50 EAN 5 16 retrieving from scanner without 2 of 5 4 58 4 86 5 12 echoing 4 48 MSI 4 59 4 88 5 14 writing at current cursor location UPC 5 16 a UPC EAN 4 66 4 92 writing with attribute at current cursor location 4 116 battery level NiCd checking Checking A ASTA for data in scanner buffer 4 72 a if NiCd battery level is okay for beeper sounding 4 96 printing 4 12 BIOS version retrieving 4 97 clearing black mark sensor retrieving state of display 4 107 4 26 motion control errors 4 20 close command 7 7 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 Code 93 bar codes configuration data structure 5 7 retrieving configuration values 4 55 setting configuration values 4 80 CODE128INFO data structure
25. 5 8 retrieving configuration values 4 56 setting configuration values 4 82 D2OF5INFO data structure 5 8 data entry modes function key 4 2 4 9 lower case Alpha 4 6 numeric normal 4 11 upper case alpha 4 8 data structures CODABARINFO 5 2 CODE128INFO 5 4 CODE39INFO 5 5 CODE93INFO 5 7 D2OF5INFO 5 8 for Codabar bar codes 5 2 for Code 128 bar codes 5 4 for Code 39 bar codes 5 5 for Code 93 bar codes 5 7 for D 2 of 5 bar codes 5 8 for general 1223 scanner information 5 9 for I 2 of 5 bar codes 5 12 for MSI bar codes 5 14 for UPC and EAN bar codes 5 16 GENERALINFO 5 9 120F5INFO 5 12 MSIINFO 5 14 reference 5 1 UPCEANINFO 5 16 data checking scanner buffer for 4 72 deactivating function key mode 4 2 defining cursor style 4 109 developing applications 3 1 disabling display 2 12 scanner 4 44 display 2 2 clearing 4 107 disabling 2 12 enabling 2 12 scrolling up or down 4 107 setting active page 4 112 display speed setting 2 3 display turning on or off 2 3 documentation related 1 4 E EAN bar codes configuration data structure 5 16 retrieving configuration values 4 66 saving configuration values 4 92 enabling display 2 12 scanner 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 AE features of printer 2 1 feeding labels 4 22 fonts descriptions 2 7 function
26. A O 7 11 WA EE A AET ET 7 12 a been 7 12 DUN E Baek A rch AO AS 7 13 A A O 7 13 DUDAS o cidad 7 14 PUN o pies 7 14 O a a a eia ranri a 7 15 TODO iii ADA A ate ao ans ee eee 7 15 SOUD AUG s sec cas ces ess ses ea A EE 7 16 SCIP OMasesisicrcns er aa eas Massena tues 7 16 SOME 7 17 UGG ASE E veods he oi ia 7 17 A O O O ian shauna ONO 7 18 Uli 7 18 UIT A A aia 7 19 DA EE E ADI DARTE IAORE RADIADOR 7 20 O O A O 7 21 UUN A dl 7 21 O 7 22 Wii iaa nia 7 22 A ea Shy et a ethnics ent sean Ok tated 7 23 vi Table of Contents A ON A 2 Sampler nte iii a Eee EEEa iae A 2 Sample ti a eh ae ath a a S A 3 Sample A e e cabs ae aeieea oreraa erreari D A 4 Sample Dored A e e T T ER A 4 Sample Escaso e r a e E Aaaa A 5 Sample se sea a aa E Sa ea te tg E as aa ae A 5 GLOSS ATV recs issecce acc zctenaceeanecessdccnteedsaamnedeosasavedeascasteuecassesatecheuesvexedaus B 1 Table of Contents vii viii Table of Contents INTRODUCTION Welcome to the software development kit SDK for the Monarch Pathfinder Ultra Go d 6037EX printer The SDK consists of software and documentation This chapter introduces the kit describing e About this Manual System Requirements SDK Contents 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 d
27. Algorithm 1 Initializes the Print subsystem without allocating font storage memory Loads a format Enables the scamner Sample Applications A 5 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 Es to break out of the loop or 0 to calibrate supplies Initiates a scan Checks whether the battery is charged enough for printing Prompts the operator to enter a quantity Builds the batch dynamically with the entered data Loads the batch cee cae ae a e Waits until the label prints by checking the status repeatedly until it returns something other than busy 6 Disable the scanner 7 Close the Print subsystem A 6 Programmer s Manual GLOSSARY Following is a list of terms you must be familiar with to write printer applications Application Buffer Attribute Calibrate Display Page Motion Control subsystem MPCL Packet Print subsystem ROM DOS Definition The programmer defined buffer in the application used to save the data from a scan The way a character appears on the printer s display in normal or reverse video The automated process where the printer determines the size length and type of the supplies it is using 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 disp
28. Algorithm 0 Save values sStatus senSetMSlinfo MSIconfig if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 89 scnSetScaninfto 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetScanlInfo 3 Sets the values in the SCANINFO data structure 4 Calls scnSetScanlnfo When the application disables the scanner the configuration values go back to the defaults Syntax short far scnSetScanInfo LPSCANINFO IprScaninfo Parameters IprScanInfo A pointer to a SCANINFO data structure Return Values 10 Successful 9 The scanner is disabled 4 90 Programmer s Manual Example include lt stdio h gt include mmsultra h void main void short sStatus 0 Command calls status LPSCANINFO SCNconfig Scanner data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus sStatus scnGetScanInfo SCNconfig Get config if sStatus 0 printf Scanner is disabled else SCNconfig gt uchCode39 SCN_ENABLE
29. Cnt short far losPage Parameters psCo Cnt A variable pointer to the number of character columns IpsPage A variable pointer to the current active display page Return Values 0 The current video mode 20 column display Example See pclCalibrate for an example 4 100 Programmer s Manual vidPutCursor Description Moves the cursor for the specified display page to the specified row and column Syntax void far vidPutCursor unsigned short usRow unsigned short usCol short sPage Parameters usRow Row For 4 row printers values are 0 3 For 8 row printers values are 0 7 usCol Column Values are 0 79 usPage Display page For 4 row printers values are 0 3 For 8 row printers values are 0 7 Return Values None Example include lt stdio h gt include mmsultra h void main void vidSetPage 0 Set the page vidScroll 0 O 3 19 O 0x07 Clear the screen vidPutCursor 0 O 0 Move the cursor printf X n Print an X printf The X is at ncolumn 0 row 0 Display message Function Reference 4 101 vidPutStr 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 it If the application writes to a display page other than the current one the written string doe
30. Code39 Info Parameters lprCode93 Info A pointer to a CODE93INFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 80 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls config LPCODE93INFO config93 Code 93 data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get config sStatus senGetCode93Info config93 if sStatus 0 printf Scanner is disabled else Set values config93 gt uchEnable SCN_ENABLE config93 gt uchlength1 0 config93 gt uchLength2 0 Save values status sensetCode93Info config93 if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 81 scnSetD2o0f5Info 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetD2of5Info 3 Sets the values in the D2OF5INFO data structure 4 Calls scnSetD2of5Info When the application disables the scanner the co
31. EAN8 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 Default SCN_DISABLE Enable disable the ability to scan supplemental characters 2 5 according to code format conventions UPCA 2 UPCE0 2 etc You can also specify to scan bar codes with or without supplemental characters Values are 0 Disable can scan with or without supplementals but supplementals are ignored 1 Enable cannot scan supplementals 2 Scan with or without supplementals but do not ignore the supplementals Default SCN_DISABLE Data Structure Reference 5 17 uchEnableSuppRedun uchXmitUPCAChkDgt uchXmitUPCEChkDgt uchXmitUPCE1ChkDgt uchUPCAPreamble 5 18 Programmers 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 Single digit numbers must have a leading zero Values are 2 20 Default 7 Enable disable the requirement to transmit UPCA bar codes with the check digit Default SCN_ENABLE Enable disab
32. ERALINFO data structure 4 Calls scnSetGenerallnfo When the application disables the scanner the configuration values go back to the defaults Syntax short far scnSetGenerallnfo LPGENERALINFO IprGenerallnfo Parameters lprGenerallnfo A pointer to a GENERALINFO data structure Return Values 10 Successful 5 Invalid configuration value 9 The scanner is disabled 4 84 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPGENERALINFO GENconfig General data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get config sStatus scnGetGenerallnfo GENconfig if sStatus 0 printf Scanner is disabled else Set values GENconfig gt uchLaserOnTime 40 GENconfig gt uchPowerMode 1 GENconfig gt uchTriggerMode 1 GENconfig gt uchSameSymbolTMO 10 GENconfig gt uchLinearCodeSecur 1 GENconfig gt uchBiDirRedun SCN_DISABLE Save values sStatus scnSetGenerallnfo GENconfig if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 85 senSetl2of5Info Description LMSSCEN LIB only Saves the scanner configuration values the application set in the 120 F5INFO data structure See 120F5INFO
33. Example include lt stdio h gt include lt conio h gt include mmsultra h void main void short sStatus 0 Command calls status char cBuffer 100 Internal scanner buffer int ilnput 0 Trigger input sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Perform scan printf Press trigger to nscan n iInput __getch if iInput 0 iInput _getch if input 0x85 sStatus senTrigger 1 if sStatus 0 printf nScanner error d sStatus else Get data from scan sStatus scnGetScannedData cBuffer if sStatus lt 0 printf Data retrieval error d sStatus else spkBeep 1 1000 Beep for success Display result printf Scan data n s n cBuffer printf Bar code type a sStatus sStatus scnCloseScanner Disable scanner Function Reference 4 65 scnGetUPCEANInfo 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 Syntax short far scnGetUPCEANInfo LPUPCEANINFO IpruPCEANInfo Parameters lorUPCEANI nfo A pointer to a UPCEANINFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetUPCEANInfo for an example 4 66 Programmer s Manual scnOpenScanner Descript
34. FIG SYS and AUTOEXEC BAT 2 12 reference data structures 5 1 reference functions 4 1 REMDISK utility using 3 4 REMSERV utility using 3 4 reprinting labels 6 4 requirements system 1 2 restoring keypad mode 4 4 retrieving 1223 scanner Codabar bar code configuration 4 52 1223 scanner Code 128 bar code configuration 4 53 1223 scanner Code 39 bar code configuration 4 54 Index 9 10 Index 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 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 black mark sensor state 4 26 characters from scanner with echoing 4 50 characters from scanner without echoing 4 48 current cursor location 4 106 current keypad mode 4 3 current supply type 4 33 current video mode 4 100 error messages 4 28 NiCd battery level 4 24 on demand sensor state 4 30 Print subsystem status 4 42 scanner buffer contents with autotrigger 4 60 scanner buffer contents without autotrigger 4 63 scanner configuration information 4 62 supplies information 4 38 type of last bar code scanned 4 46 ieee sample applications A 1 scan initiating 4 95 scanner checking for data in buffer 4 72 configuring 4 90 disabling 4 44 enabling 4 67 enabling
35. FO 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 2 of 5 bar codes 4 86 for MSI bar codes 4 88 for UPC EAN bar codes 4 92 GENERALINFO data structure 5 9 I2OF5INFO data structure 5 12 MSIINFO data structure 5 14 retrieving Codabar bar code values 4 52 retrieving Code 128 bar code values 4 53 retrieving Code 39 bar code values 4 54 retrieving Code 93 bar code values 4 55 retrieving D 2 of 5 bar code values 4 56 retrieving general configuration values 4 57 retrieving 2 of 5 bar code values 4 58 retrieving MSI bar code values 4 59 retrieving UPC EAN bar code values 4 66 setting general information values 4 84 UPCEANINFO data structure 5 16 oe activating function key mode 4 9 lower case alpha mode 4 6 numeric normal mode 4 11 upper case alpha mode 4 8 adjusting LCD backlight 4 99 applications building 3 3 compiling 3 3 developing 3 1 linking 3 4 samples 1 testing away from PC 3 4 writing 3 2 Index 1 2 Index AUTOEXEC BAT booting bypassing 2 12 normally 2 11 receiving prompts for each line 2 12 Options 2 12 B building applications 3 3 backlight adjusting 4 99 packets dynamicaiiy es bypassing CONFIG SYS and bar code type last scanned retrieving AUTOEXEC BAT 2
36. Key mode is set while Numeric Normal mode is in effect 70 Function Key mode is set while Upper case Alpha mode is in effect 12 Function Key mode is set while Lower case Alpha mode is in effect Example See kbdRestoreMode for an example Function Reference 4 3 kbdRestoreMode Description Changes the keypad s data entry mode to the one saved previously when the application called kbdGetMode Syntax void kbdRestoreMode int Parameters 7 Numeric Normal mode 2 Upper case Alpha mode 4 Lower case Alpha mode Return Values None Example include lt stdio h gt include lt conio h gt include mmsultra h void main void int isavedmode 0 Saved mode int ilnput 0 Alpha key entered Savedmode kbdGetMode Save the current mode To Upper case Alpha kbdSetCaps printf Press an alphabetic nkey Test the mode while _kbhit iinput _getch printf nYou pressed c n ilnput Return to prev mode kbdRestoreMode iSavedmode 4 4 Programmer s Manual printf nPress the same key Test the mode while _kbhit iinput _getch printf nYou pressed c n ilnput Function Reference 4 5 kbdSetAlpha Description Changes the keypad s data entry mode to Lower case Alpha mode Syntax void kbdSetAlpha void Parameters None Return Values None Example include lt stdio h gt include lt conio h gt include mmsultra h vo
37. NED quesos isidro 5 2 CODETZRINEO o rl die 5 4 iv Table of Contents GODESSINGO e en detras o e tas caer ao 5 5 CODESSIN Orea add 5 7 D2OF5INFO raea olores llosa EE ga 5 8 GENERALIN FO aea aa ented E e aaa Gena 5 9 Scan Security Level Sicario 5 10 IPORSINE Orie ect a e aaaea a e a 5 12 MISTING O8iscaceacees sor orrera eE EE EE OO TEE 5 14 UPCEANINF O 300 A e aati ee eae 5 16 Scan Security Levels ai ches panne ba staees ea eael peo pene ads bias 5 20 Programming Technics aa 6 1 P nting LabelSi siorse rereset saededs vas gaes vee g9ed eee gaceetysoee css 6 1 Printing Single Labels coacalco 6 2 Printing Multiple Labels acusar 6 2 A A ore et ee each vad diced na een 6 3 Reprinting Labels mesara eoan A Ea E DE Ea Dap Esi 6 4 Pausing While Printing vice ee AA 6 4 Loading Multiple Packets Together onene 6 4 Building Packets Dynamically n 6 5 Using th Scannere e ela 6 5 Reading Trigger Pulsa cee cneu take Guay l te Deen 6 5 Audio Visual FOGODaGK ix cion iia 6 6 Using UServe and UClient scccccccseeeeeeeeeeeeeeeeeeeeeeeeeeseensneeeeeeaees 7 1 Establishing a PC Printer Connection ooocccccncccnccccncnnconinoncnnnccinnnnnnns 7 1 Copying Filas 2 GI TA AAA 7 3 Example Pile Copec ld Ot sad 7 4 UGlient Commands rreren iii 7 5 SYNTAX Convention S css gaai EEE EE EEE ire 7 6 LOS E EE E EA AAA E A EEN 7 7 Table of Contents v NGI ects O Varn ain A AS O a aoa ats 7 8 NN 7 9 Mad e edo 7 9 A E PEE E EA E ET 7 10 Mi A 7 11
38. OM DOS files font MPCL packets containing the printer s external base fonts images Pre built ROM disk images include Include files lib Library files samples Source code samples utilities Utility programs Introduction 1 3 Related Documentation The following table describes other documentation for the printer Item Description ROM DOS User Manual Information about the printer s ROM DOS operating system Equipment Manual Information about printer operation Application Notes Technical information needed for application development beyond writing a C C program It contains information on radio networks memory cards etc Packet Reference Manual Syntax descriptions of the MPCL printer language Datalight Sockets Describes the TCP IP stack and API Developer s Guide for use with radio cards 1 4 Programmer s Manual PRINTER FEATURES 2 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 This chapter describes the following printer features Display Keypad Speaker e Memory Fonts Scanners Boot Process Windows 95 Network Notes Printer Features 2 1 Display The printer has an 8 row display The printers can display characters in e
39. 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 Verify the spelling of the command name and re enter it Retry the udiskfree command but specify either cor das the drive letter A UServe error occurred Physically reboot the printer not with the reboot command start UServe and try the command again If the error still occurs have the printer serviced SAMPLE APPLICATIONS 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 Following are the samples discussed Sample Description Prints with the trigger Prints with the on demand sensor Prints a strip of labels Prints using fonts and formats loaded with pclOpen Uses the scanner Scans and prints NO BR WD Scans specific bar codes and prints Sample Applications A 1 Sample 1 Function Prints with the trigger Algorithm 1 Initialize the Print subsystem without allocating font storage memory 2 Loads a format packet 3 Performs the following until the operator presses the trigger to print E to break out of the loop or 0 to calibrate supp
40. S build date If you do not need the date set this parameter to NULL Return Values 10 Successful 1 Unsuccessful Example include lt stdio h gt include mmsultra h void main void int iStatus 0 Status of retrieval unsigned char ucVersion 9 BIOS version unsigned char ucDate 10 BIOS date Function Reference 4 97 iStatus sysGetBlOSVersion ucVersion ucDate Get info if iStatus 0 printf BIOS Version retrieval failed else vidScroll 0 0 3 11 0 0x07 Display results vidPutCursor 0 O 0 printf BIOS printf Version is s n ucVersion printf Date is s ucDate 4 98 Programmer s Manual vidBackLightOn Description Turns the LCD backlight on or off Syntax void far vidBackLightOn short sOn Parameters sOn The state to change the backlight to Values are 7 for On and O for Off Return Values None Example tinclude lt conio h gt include lt stdio h gt include mmsultra h void main void int clnput 32 User input printf Turn backlight on n Y N Prompt user clnput _getch Get input switch clnput Take action case N vidBackLightOn 0 break case Y vidBackLightOn 1 break default printf Invalid input Function Reference 4 99 vidGetState Description Retrieves the current video mode as defined in vidSetMode Syntax unsigned short far vidGetState short far losCol
41. SIINFO data structure Syntax short far senGetMSlinfo LPMSIINFO lprMSIInfo Parameters lorMSI info A pointer to a MSIINFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetMSIInfo for an example Function Reference 4 59 scnGets 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 If there is any chance the scanned bar code contains a binary zero do not use this function Instead use scnGetch and scnScannerHit in a loop until the scan is complete Use scnGetScannedData to retrieve the scanner buffer s contents without activating the scanner when the buffer is empty Syntax char far far scnGets char far lpszData Parameters loszData A pointer to a programmer defined application buffer where the function copies the scanner buffer s contents This buffer must be one byte longer than the largest string that you may scan Return Values A pointer to the Successful buffer parameter NULL pointer An error occurred 4 60 Programmer s Manual Example include lt conio h gt include lt stdio h gt include mmsultra h void main void char pStatus2 NULL Pointer to cBuffer char cBuffer 100 App
42. Sending File lookup txt 2000 bytes Bytes Sent 2000 Complete putbios Description Copies a BIOS binary file from the PC to the printer Syntax putbios filename Parameters filename The name of the BIOS file Example putbios bios dat copies bios dat from the PC to the printer displaying the file name and status of the command as it does so puttrueffs Description Copies a TrueFFS binary file from the PC to the printer Syntax puttrueffs filename Parameters filename The name of the file 7 14 Programmer s Manual 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 quit Description Exits UClient Syntax quit Parameters None Example quit Exits the program and returns PC control to Windows reboot Description Restarts the printer UServe stops running as a result Syntax reboot Parameters None Example reboot restarts the printer If successful the UClient prompt reappears Using UServe and UClient 7 15 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 1200 2400 4800 9600 19200 38400 57600 and 115200 Example setbaud 9600 sets the baud rate to 9600 setport Description Specifies the port to use on th
43. Set value sStatus scnSetScanInfo SCNconfig Save value if sStatus 0 printf Scanner is disabled else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 91 scnSetUPCEANInfo 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetUPCEANInfo 3 Sets the values in the UPCEANINFO data structure 4 Calls scnSetUPCEANInfo When the application disables the scanner the configuration values go back to the defaults Syntax short far scnSetUPCEANInfo LPUPCEANINFO IprUPCEANInfo Parameters lorUPCEANI nfo A pointer to a UPCEANINFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 92 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPUPCEANINFO UEconfig UPCEAN data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get configuration sStatus scnGetUPCEANInfo UEconfig if sStatus 0 printf Scanner is disabled else Set value
44. Status scnGetCodel 28Info config 128 if sStatus 0 printf Scanner is disabled else Set values config 28 gt uchEnableUSS128 SCN_ENABLE config128 gt uchEnableUCCEAN128 SCN_DISABLE config128 gt uchEnablelSBT128 SCN_DISABLE Save values sStatus scnSetCodel 28Info config128 if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 77 senSetCode39Info 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls senGetCode39Info 3 Sets the values in the CODE39INFO data structure 4 Calls scnSetCode39Info When the application disables the scanner the configuration values go back to the defaults Syntax short far scnSetCode39Info LPCODE39INFO IprCode39 Info Parameters lprCode39Info A pointer to a CODE39INFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 78 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPCODE39INFO config39 Code
45. ULL printf nScanner error else spkBeep 1 1000 Beep for success sStatus scnGetch Get first char if sStatus lt 0 Display result printf Error getting char d sStatus else printf nFirst Char is Ac sStatus sStatus scnCloseScanner Disable scanner Function Reference 4 49 scnGetche Description Retrieves a character from the scanner buffer and echoes it to the display If the scanner buffer is empty this function activates the scanner to let the operator scan another bar code This function works with each scanner This function tracks the characters in the bar code internally For example after a scan a call to scnGetche reads the first character Subsequent calls to scnGetche read the subsequent characters in the bar code For example the second call reads the second character the third call reads the third character etc 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 2 Decoding fault The scanner scanned the bar code but the printer could not decode it 4 Checksum error 9 Scanner is disabled 10 Time out error 4 50 Programmer s Manual Example include lt conio h gt include lt stdio h gt include mmsultra h void main void short sStatus 0 Status of comm calls char cBuffer 100 Application buff
46. ableFullASCII at the same time Default SCN_DISABLE uchCvtC39toC32 Enable disable the ability to convert Code 39 bar codes to Code 32 bar codes You must enable uchEnable when enabling this parameter Default SCN_DISABLE Data Structure Reference 5 5 uchEnableC32Prefix uchLength1 uchLength2 uchVerifyCheckDigit uchXmitCheckDigit uchEnableFullASCII 5 6 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 You can specify one or two lengths a range of lengths or that any length is valid If uchEnableFullASCII is enabled a range or any length is preferred Enter values as follows Option uchLength1 uchLength2 1 Length Value 0 2 Lengths High Value Low Value Range Min Value Max Value Any length 0 0 Default 2 uchLength1 and 55 uchLength2 Enable disable the ability to check the integrity of Code 39 bar codes When this parameter is enabled only Code 39 symbols with a modulo 43 check digit are decoded Default SCN_DISABLE Enable disable the ability to transmit check digits with the data Default SCN_DISABLE Enable disable the ability to scan Full ASCII Code 39 bar codes The scanner cannot distinguish Code 39 bar codes from Full ASCII Code 39 bar codes Do not enable uchEnableTriopti
47. accasnanonananananas 3 1 Creating MPGL Packets ii iii 3 2 Writing Applications ecipnia si 3 2 Building Applications rs dreien e s 3 3 Combplling APDUCAtI NS coros rs 3 3 Linking Applications senda dadas 3 4 Using UServe and UCHONT teca 3 4 Test the Application eio tieso niae naa aia 3 4 Training the End Us o ae eee eee 3 5 Funotion ROlOON CG iciiicescadsncwdinaccetusincstvetaceteessasacesseacsannansuauaeccedeesanes 4 1 kbdCIr FUN oo rast Sa eg ne etree ta ts ae Re en ene 4 2 KDI OO Gc citas 4 3 KDC RGSIOREMOOG a ccrinaco oc talla 4 4 A tinct ites opiate eee 4 6 KBD CIC ADS toa 4 8 KD OS OU PUNCU tn2scsvacdcasiscdeocinedeqesendd aasuadiaetuletiatubeesh ies ehegadetdveteangia 4 9 KDOSGUNG Mitel a A ee eee ee ee ate 4 11 PelBatteryORTOP A Rites ReetieGeehaa enol ealtcieateniey 4 12 AI a A Ro 4 13 pelCalibrateP ADO cities titi 4 18 AA A encima oh eae E 4 20 DCIGIOSG POCO OOO O S 4 21 DOF cease rt kde lee pee 4 22 PEIGEtBattery Level socios E e E 4 24 pclGetBlackMarkSensor cecceeeeeeeeceeeeeeeeeseeeeeeeeeseaaaeeeeneees 4 26 ii Table of Contents PCIGOLEPORMSG ui o Mode ead edie 4 28 pcIGetOnDemandS ens OT oconinonnionnnanicic 4 30 PEIG OTS Up Ply TIPO suis 4 33 A A 4 35 A A E ean oa br E eee 4 37 DCIPapGr NiO oia Aki ele ee a 4 38 AA aresep pp EEA EEEN EERE EEES 4 39 DCISTALUS a a e oer 4 42 NIT A cesta a a a a arenas aa tianimeatae 4 43 SONCIOS OC ANN ri ii O NAAA ASA A LAA 4 44 s nGetBarCode Type ses
48. and PC to use Then click OK 6 Select Open from the Connection menu to open the connection between the two units 7 2 Programmer s Manual 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 For the PC to be ready UClient must be running the communication parameters must be set and Open must have been selected from the Connection steps 3 6 in Establishing a PC Printer Connection If one side stops being ready the other one stays ready To re open the connection you only need to make the one side ready again The connection between the units immediately opens Copying Files To copy files between the units you enter commands at the UClient prompt Note that you copy files with the PC only the one exception is the urun command see urun 1 Leaving it powered on the PC printer connection intact and UServe running set aside the printer 2 Type ucd d at the UClient prompt to change the printer to the d drive NOTE Never copy application files to the c drive on the printer Always use the d drive This minimizes the possibility of accidentally corrupting system files Using UServe and UClient 7 3 3 Enter commands one at atime at the UClient prompt to copy files to the p
49. and or program on the printer uview Displays a file s contents on the printer uwd Displays the path to the current directory on the printer Syntax Conventions The syntax in this section uses the following conventions Bold Syntax items in bold are the command name Italics Items in italics are names of variables Italics tems in bold italics are values that a variable can take Items in brackets are optional 7 6 Programmer s Manual 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 to confirm it get Description Copies a file from the printer to the PC NOTE Ifa file by the same name already exists it will overwrite the file without warning Syntax get printerfile ocfile Parameters printerfile The name and path of the source file pcfile The name and path of the destination file If you do not specify this parameter it gets the same name and path on the PC Using UServe and UClient 7 7 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 Com
50. annerHit void Parameters None Return Values 0 The scanner buffer is empty Non zero The type of bar code in the scanner buffer When you use either library the following values can be returned DCDE_C39 Code 39 3 of 9 code DCDE_CBAR Codabar 2 of 7 code DCDE_C128 Code 128 DCDE_ 120f5 2 of 5 USD 1 DCDE_UPCA UPCA DCDE_UPCE UPCE DCDE_EAN8 EAN8 DCDE_EAN13 EAN13 DCDE_UPCA_2 UPCA 2 DCDE_UPCE_2 UPCE 2 DCDE_EAN8_2 EAN8 2 DCDE_EAN13_2 EAN13 2 DCDE_UPCA_5 UPCA 5 DCDE_UPCE_5 UPCE 5 DCDE_EAN8_5 EAN8 5 DCDE_EAN13_5 EAN13 5 DCDE_ MS MSI 4 72 Programmer s Manual Example include lt stdio h gt include mmsultra h void main void short sStatus 0 Command calls status LPSCANINFO SScnconfig Scanner data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Configure scanner sStatus scnGetScanInfo SScnconfig if sStatus 0 printf Scanner is disabled n else SScnconfig gt uchCode39 SCN_ENABLE sStatus senSetScaninfo SSenconfig if sStatus 0 printf Scanner is disabled n else printf Scanning n Perform scan sStatus senTrigger 1 if sStatus 0 printf Scan error Zd n sStatus else spkBeep 1 1000 sStatus scnScannerHit Check scanner buffer if sStatus 0 printf Scanner buffer is nempty n else Display result printf Bar code scanned was a
51. application buffer If the scanner buffer is empty this function does not activate the trigger to start a scan This function works with each scanner If there is any chance the scanned bar code contains a binary zero do not use this function Instead use scnGetch and scnScannerHit in a loop until the scan is complete Use scnGets to retrieve the scanner buffer s contents and activate the scanner when the buffer is empty Syntax short far scnGetScannedData char far lpszData Parameters lposzData A pointer to a programmer defined application buffer where the function places the scanner buffer s contents This buffer must be one byte longer than the largest string that you may scan Return Values 0 No data available 7 Checksum time out or communications error 2 Decoding fault The scanner scanned the bar code but the printer could not decode it 9 Scanner is disabled Function Reference 4 63 The type of bar code retrieved The following values can be returned when you use either library DCDE_C39 DCDE_CBAR DCDE_C128 DCDE_120f5 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 2 of 5 USD 1 UPCA UPCE EAN8 EAN13 UPCA 2 UPCE 2 EAN8 2 EAN13 2 UPCA 5 UPCE 5 EAN8 5 EAN13 5 MSI
52. ata Structure Reference 5 19 uchCvtEAN8toEAN13 uchSecurityLevel uchEnableCouponCode Scan Security Levels Description Enable disable the ability to convert EAN8 zero extended bar codes to EAN13 format You must enable uchEAN8ZeroExtend when enabling this parameter Default SCN_ENABLE The scan security level for UPC EAN bar codes See Scan Security Levels for descriptions of each level Values are 0 3 Default 0 Enable disable the ability to scan UPCA UPCA 2 UPCA 5 and UPC EAN128 bar codes You must set uchEnableSupps to 2 when enabling this parameter Default SCN_DISABLE 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 0 Provides security sufficient for bar codes that meet specifications 1 Provides security sufficient for bad scans that are limited to characters 1 2 7 and 8 2 Provides security sufficient for bad scans that are not limited to characters 1 2 7 and 8 3 Provides security for continued bad scans after you increase security to level 2 You may need to adjust the security as needed during scanning 5 20 Programmer s Manual PROGRAMMING TECHNIQUES GM Many applications have common features such as requiring the operator to press the trigger
53. attery level before any processing Use this function immediately prior to printing but not during printing If you use this function during printing the return value is not accurate Syntax unsigned short far pclGetBatteryLevel void Parameters None Return Values lt 711 You must charge the battery 712 831 The battery level is high enough to run the printer but not print gt 832 The battery level is high enough to run the printer and print 4 24 Programmer s Manual Example include lt stdio h gt include mmsultra h void main void PRINTINIT pConfig Print data structure short sStatus 0 Status of comm calls unsigned short usStatus 0 Battery level sStatus pclinit NULL Start Print subsystem if sStatus 0 printf Init Failed nError d sStatus else usStatus pclGetBatteryLevel Get the battery level if usStatus lt 711 Display results printf Charge the battery else if UsStatus gt 832 printf Can run and print else printf Can run cannot print pclClose Close Print subsystem Function Reference 4 25 pclGetBlackMarkSensor Description Retrieves the black mark sensor s latest state This state is not necessarily the current state because it is updated only by the Print subsystem Syntax unsigned short far pclGetBlackMarkSensor void Parameters None Return Values 7 The supplies are aligned on the black
54. boot process is straightforward and flexible enough to enable you to do a variety of things as needed such as running or not running AUTOEXEC BAT or only certain lines in AUTOEXEC BAT Normal Boot When the printer boots normally 1 The startup screen appears By default the display is disabled nothing other than the startup screen appears If the LCD command is given it becomes enabled later in this process A line moves left to right across the display s bottom to indicate the boot process is working 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 If the printer never enables the display the startup screen never disappears and the printer waits indefinitely for a response to the date prompt The display is enabled if there is an LCD command in AUTOEXEC BAT that enables the display or you enable the display manually by holding down when you turn the printer on The startup screen disappears and the DOS prompt appears Printer Features 2 11 Display Control You can either enable or disable the display Enabling the Display To enable the display either press while turning the printer on When messages appear on the display release the key If you continue to hold down after the messages appear the display move
55. c and uchEnableFullASCI I at the same time Default SCN_DISABLE CODE93INFO 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 unsigned char uchLengthl unsigned char uchLength2 CODE93INFO Description uchEnable Enable disable the ability to scan Code 93 bar codes Default SCN_DISABLE uchLength1 Specifies lengths including check digits for uchLength2 Code 93 bar codes You can specify one or two lengths a range of lengths or that any length is valid Enter values as follows Option uchLength1 uchLength2 1 Length Value 0 2 Lengths Higher Value Lower Value Range Min Value Max Value Any length 0 0 Default 4 uchLength1 and 55 uchLength2 Data Structure Reference 5 7 D20F5INFO 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 scnSetD20f5 Info typedef struct _D2of5Info unsigned char uchEnable unsigned char uchLength1 unsigned char uchLength2 D2OF5INFO uchEnable uchLength1 uchLength2 5 8 Programmer s Manual Description Enable disable the ability to scan D 2 of 5 bar codes Default SCN_DISABLE Specifies lengths includ
56. contain one line containing LCD Y C which enables the display Enter REMSERV A at the PC s DOS prompt where X is the drive where the boot files reside Turn on the printer and from the Startup Menu choose 3 The printer boots from the PC Printer Features 2 13 Startup Menu To display the Startup Menu 1 Press the and On Off keys at the same time 2 When the logo screen appears release the key 3 When the menu appears press the number of your choice and then quickly If you don t do it quick enough the menu scrolls off the screen 6037 Startup Menu 1 Normal Boot 2 Ultra Server 3 Remote Server 4 System Options Normal Boot Continues the boot process 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 Diagnostics Print Passthru CMOS Setup F W Update DOS Prompt Diagnostics Runs the Diagnostics program See the Application Notes for more information Print Passthru Starts the Online Passthrough Utility see Developing Applications for more information CMOS Setup Enables a choice of power management modes F W Update Flashes the firmware in the printer DOS Prompt Bypasses the AUTOEXEC BAT and CONFIG SYS files during bootup Wind
57. cter to write Bell backspace carriage return and line feed characters are invalid sCount The number of times to write the character This number must be less than or equal to the number of columns remaining in the current row sPage The display page For 4 row printers values are 0 3 For 8 row printers values are 0 7 Return Values None 4 114 Programmer s Manual Example include mmsultra h void main void int iCharacter 42 vidSetPage 0 vidScroll 0 0 7 19 0 0x07 vidPutCursor 0 O 0 vidWriteC iCharacter 5 0 An asterisk Set page Clear screen Position cursor Write character Function Reference 4 115 vidWriteCA 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 To write a character without an attribute use vidWriteC 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 Strings written to the current page appear immediately Syntax void far vidWriteCA unsigned char uchChr unsigned char uchAttr short sCount short sPage Parameters uchChr The ASCII character to write Bell backspace carriage return and line f
58. data structure contains scanner configuration information about 2 of 5 bar codes To read these values applications call scnGetl2of5Info to set these values they call scnSetl2of5Info typedef struct _I2of5Info unsigned char uchEnable unsigned char uchLength1 unsigned char uchLength2 unsigned char uchChkDgtAlgorithm unsigned char uchXmitCheckDigit unsigned char uchCvtl2of5toEAN 13 120OF5INFO Description uchEnable Enable disable the ability to scan 2 of 5 bar codes Default SCN_ENABLE uchLength1 Specifies lengths including check digits uchLength2 for 2 of 5 bar codes You can specify one or two lengths a range of lengths or that any length is valid Enter values as follows Option uchLength1 uchLength2 1 Length Value 0 2 Lengths High Value Low Value Range Min Value Max Value Any length 0 0 Selecting the any length option may lead to mis decodes Default 14 uchLength1 and O uchLength2 5 12 Programmer s Manual uchChkDgtAlgorithm uchXmitCheckDigit uchCvtl2of5toEAN13 Description Specifies whether the scanner should check the integrity of 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 0 Do not check the integrity 1 Check the integrity against the USS algorithm 2 Check the integrity against the OPCC algorithm Default 0 Enable disable the requirement to
59. e 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 senSetCode128Info typedef struct _Codel28Info unsigned char uchEnableUSS128 unsigned char uchEnableUCCEAN 1 28 unsigned char uchEnablelSBT128 CODE128INFO Description uchEnableUSS128 Enable disable the ability to scan Code 128 bar codes Default SCN_ENABLE uchEnableUCCEAN128 Enable disable the ability to scan UCC EAN 128 bar codes Default SCN_ENABLE uchEnablelSBT128 Enable disable the ability to scan ISBT 128 bar codes Default SCN_ENABLE 5 4 Programmer s Manual CODE39INFO 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 senSetCode39Info typedef struct _Code39Info unsigned char uchEnable unsigned char uchEnableTrioptic unsigned char uchCvtC39toC32 unsigned char uchEnableC32Prefix unsigned char uchLength1 unsigned char uchLength2 unsigned char uchVerifyCheckDigit unsigned char uchXmitCheckDigit unsigned char uchEnableFullASCII CODE39INFO Description uchEnable Enable disable the ability to scan Code 39 bar codes Default SCN_ENABLE uchEnableTrioptic Enable disable the ability to scan Trioptic Code 39 bar codes Do not enable uchEnableTrioptic and uchEn
60. e PC for communication between it and the printer overriding the default set from UClient s Connection menu Syntax setport port Parameters port The communication port on the PC that you have attached the cable to Values are com1 com Example setport com specifies to use the PC s com1 communication port 7 16 Programmer s Manual 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 Syntax settimeout length Parameters length The length of the timeout in seconds Example settimeout 10 sets the PC timeout to 10 seconds lf the command is successful the UClient prompt reappears ucd Description Changes the directory on the printer Syntax ucd directory Parameters directory The name or path of the new directory Move up one directory the specification does not work with this command Example ucd data changes the printer to the data directory displaying the UClient prompt when complete Using UServe and UClient 7 17 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 Deleted File autoexec bat confirming the deletion udir Description
61. e following values can be returned when you use either library DCDE_C39 DCDE_CBAR DCDE_C128 DCDE_ 20f5 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 46 Programmer s Manual Code 39 3 of 9 code Codabar 2 of 7 code Code 128 2 of 5 USD 1 UPCA UPCE EAN8 EAN13 UPCA 2 UPCE 2 EAN8 2 EAN13 2 UPCA 5 UPCE 5 EAN8 5 EAN13 5 MSI Example include lt conio h gt include lt stdio h gt include mmsultra h void main void short sStatus 0 Command calls status char cBuffer 50 Application buffer int ilnput 0 Trigger input sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner open error d sStatus else printf Press trigger to scan n Perform scan iInput __getch if ilnpout 0 iInput _getch if input 0x85 sStatus senTrigger 1 if sStatus 0 printf Scanner trigger error d sStatus else spkBeep 1 1000 Beep for success Retrieve data sStatus scnGetScannedData cBuffer if sStatus lt 0 printf Error retrieving scanner data d sStatus else Get bar code type sStatus scnGetBarCodelType printf Bar code is a d sStatus sStatus scnCloseScanner Disable scanner Function Reference 4 47 scnGetch Description Retriev
62. eed characters are invalid uchAttr The character s attribute Values are 0x07 Normal video Ox70 Reverse video sCount The number of times to write the character This number must be less than or equal to the number of columns remaining in the current row 4 116 Programmer s Manual sPage The display page For 4 row printers values are 0 3 For 8 row printers values are 0 7 Return Values None Example include mmsultra h void main void int iCharacter 42 vidSetPage 0 vidScroll 0 0 7 19 0 0x07 vidPutCursor 0 O 0 vidWriteCA iCharacter 0x70 5 0 An asterisk Set page Clear screen Position cursor Write character Function Reference 4 117 4 118 Programmer s Manual DATA STRUCTURE ES REFERENCE Certain functions described in the last chapter require the application to use certain data structures This chapter describes these structures lt lists them alphabetically Following is an overview Name Description CODABARINFO Scanner configuration for Codabar bar codes CODE128INFO Scanner configuration for Code 128 bar codes CODE39INFO Scanner configuration for Code 39 bar codes CODE93INFO Scanner configuration for Code 93 bar codes D2OF5INFO Scanner configuration for D 2 of 5 bar codes GENERALINFO General scanner configuration IZOF5INFO Scanner configuration for 2 of 5 bar codes MSIINFO Scanner configuration for MSI bar codes UPCEANINFO Scanner Configura
63. el Zpl pack structure members c use only with multiple source code files Include Files You must always use MMSULTRA H If you are using Datalight Sockets include CAPI H and COMPILER H Developing Applications 3 3 Linking Applications Although you may also use other options when linking you must specify the object files executable file map file libraries you are using Libraries Use the following libraries Also use LMSDLSKT LIB with Datalight Sockets Name Printer Support Scanner Support LMS6037 LIB All printing Any scanning except where you configure the scanner for a particular bar code LMSSCNEN LIB None Scanning where you configure the scanner for a particular bar code Using UServe and UClient 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 Test the Application It is good practice to test your application when you have loaded it into the printer 3 4 Programmer s Manual Training the End Users 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 The Operators and System Administrators must know how to use the application They also must know how to perfo
64. er Example include lt bios h gt include lt stdio h gt include lt conio h gt include mmsultra h void main void short sStatus 0 Command calls status unsigned uStatus 0 bios_serialcom status int ilnput 0 Trigger input static char cBuffer 200 Application buffer char far oScan NULL Pointer from scan sStatus scnOpenScannerShared Enable shared scanner if sStatus 0 printf Error opening scanner n d n sStatus else Open port uStatus _bios_serialcom _COM_INIT O _COM_9600 _COM_CHR8 _COM_EVENPARITY _COM_STOP1 printf Comm port open n printf return status d nPress Enter _getch uStatus 4 70 Programmer s Manual printf nScanning n Perform scan iInput getch if Input 0x00 iInput getch if input 0x85 pScan scnGets cBuffer if pScan NULL printf Scanning error n else spkBeep 1 1000 printf Scanned data n s nPress Enter n amp cBuffer _getch Send data out port uStatus _bios_serialcom _COM_SEND O 0 printf Comm port write n printf return status d nPress Enter uStatus _getch scnCloseScanner Disable scanner Function Reference 4 71 scnScannerHit 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 Syntax short far scnSc
65. er char pBufptr NULL Pointer to cBuffer int ilnput 0 Trigger input sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus printf Press trigger to nscan n Perform scan ilnput __getch if Input 0 iInput __getch if iInput 0x85 pBufptr scnGets cBuffer if pBufptr NULL printf nScanner error else spkBeep 1 1000 Beep for success sStatus scnGetche Get first char if sStatus lt 0 Display result printf Error getting char d sStatus else printf is the first char sStatus sStatus scnCloseScanner Disable scanner Function Reference 4 51 scnGetCodabarlinfo 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 See CODABARINFO in Chapter 5 to learn more about the CODABARINFO data structure Syntax short far scnGetCodabarinfo LPC ODABARINFO IlprCodabarlinfo Parameters lorCodabarInfo A pointer to a CODABARINFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetCodabarinfo for an example 4 52 Programmer s Manual scnGetCodei128Info Description LMSSCEN LIB only Retrieve
66. er s Manual Enter 0 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 Packet Reference Manua for more information Example include lt stdio h gt include lt stdlib h gt include lt conio h gt include mmsultra h unsigned short far pascal StockTypePrompt unsigned short far IpusPaperType unsigned short far pascal StockPrompt unsigned short far IpusLeninches unsigned short far IpusWidthinches void main PRINTINIT rConfig unsigned short usStatus 0 Initialize the printer usStatus pclinit NULL if usStatus 0 printf Init Failed nError Ad usStatus exit 1 Calibrate with the function doing all the prompts usStatus pclCalibrate OxFFFF OxFFFF OxFFFF O 0 if usStatus 0 printf Calibrate Failed nError u usStatus pclClose exit 1 Function Reference 4 15 Calibrate with constant 2 width and paper type Let function prompt for the stock length usStatus pclCalibrate OxFFFF 200 MMS_LOW_ENERGY O 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 IpusPaperType
67. es a character from the scanner buffer without echoing it to the display If the scanner buffer is empty this function activates the scanner to let the operator scan another bar code This function works with each scanner This function tracks the characters in the bar code internally For example after a scan a call to scnGetch reads the first character Subsequent calls to scnGetch read the subsequent characters in the bar code For example the second call reads the second character the third call reads the third character etc 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 2 Decoding fault The scanner scanned the bar code but the printer could not decode it 4 Checksum error 9 Scanner is disabled 10 Time out error 4 48 Programmer s Manual Example include lt conio h gt include lt stdio h gt include mmsultra h void main void short sStatus 0 Status of comm calls char cBuffer 100 Application buffer char pBufptr NULL Pointer to cBuffer int ilnput 0 Trigger input sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus printf Press trigger to nscan n Perform scan ilnput __getch if Input 0 iInput __getch if iInput 0x85 pBufptr scnGets cBuffer if pBufptr N
68. escribes the conventions used in this manual Convention Description Brackets indicate optional items Ellipses indicate the preceding item is repeated one or more times Italics An item appearing in italics is a variable a function parameter or a value of a variable Bold An item appearing in bold is being emphasized A plus sign placed between two keys indicates to press the keys at the same time Introduction 1 1 System Requirements Following are the hardware and software requirements for the SDK Refer to your Windows and C C documentation for additional requirements Hardware Requirements You need an IBM PC or 100 compatible with 4 80486 or higher processor VGA or higher monitor at least 8 MB of memory 16 MB recommended 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 Any third party products for serial communications purchased separately Microsoft C C 1 52 1 2 Programmer s Manual SDK Contents The SDK is located in the directory you specified during installation It is divided into several sub directories as described below Sub directory Description bin Development tools docs Online documentation dos R
69. ey when reset _getch pclClearError pclClose Close Print subsystem 4 34 Programmer s Manual pclinit Description Initializes the Print subsystem An application must call this function before calling any other pcl functions Initialize and close the Print subsystem only once in the application Syntax short far pclinit void Parameters None Return Values 10 Successful Example include lt conio h gt include lt malloc h gt include lt stdio h gt include mmsultra h void main void short sStatus 0 Status of comm calls Start Print subsystem sStatus pclinit NULL Function Reference 4 35 if sStatus 0 Branch to printing routine else if sStatus gt 703 amp amp sStatus lt 793 printf Motion Control Error else printf Error press any key when reset _getch poclClearError pclClose Close Print subsystem 4 36 Programmer s Manual pclOpen Description Loads MPCL packets from the specified file Generally you use this function for fixed packets such as formats An application can call this function as often as needed It is not necessary to open a particular file more than once in an application Syntax short far pclOpen char far lpszFileName Parameters loszFileName Return Values 0 Non zero Example The fully qualified path for the file containing the MPCL packets If it is in the same d
70. f How many labels do nyou need Num _getch printf nPrinting c labels iNum Branch to printing routine 4 10 Programmer s Manual kbdSetNormal Description Changes the keypad s data entry mode to Numeric Normal mode Syntax void kbdSetNormal void Parameters None Return Values None Example include lt stdio h gt include mmsultra h void main void char cName 25 Entered name char cNumber 4 Entered number Set Upper case Alpha mode kbdSetCaps printf Enter Operator Name Enter operator name gets cName kbdSetNormal Set Normal mode printf Enter Operator Enter operator number gets cNumber branch to name and number processing routine Function Reference 4 11 pclBatteryOkToPrint 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 Use this function immediately prior to printing but not during printing If you use it during printing the return value is not accurate Syntax unsigned short far pclBatteryOkToPrint void Parameters None Return Values 0 The battery level is too low to allow printing Non zero The battery level is high enough to allow printing Example See pcIGetOnDemandSensor for an example 4 12 Programmer s Manual pclCalibrate Description
71. f puts and putc in the application the message wraps to the next line and the cursor moves The vid functions truncate the message if it extends beyond the twentieth column and only vidP utC ursor moves the cursor LCD Utility Use the LCD Utility to setthe display speed turn the display on or off turn the backlight on or off You must reference this utility in AUTOEXEC BAT to enable the display before you run your application Printer Features 2 3 LCD options You can enter one or more of the following options on the command line Y Enable the display This option is the default N Disable the display F Set the display speed to fast S Set the display speed to slow Cc Clear display Using this command is equivalent to using the cls command D Backlight off L Backlight on Keypad The following table describes the keypad s data entry modes These are described in more detail in the Equipment Manual Mode Acceptable Keys Numeric Symbol Default Numbers and Symbols Alphabetic Letters Special Key Function Keys Normally when entering data the operator must enter and exit the modes manually However with the Kbd functions described in Chapter 4 an application can also change between the modes automatically Using the trigger is a special case of Function Key mode See Reading Trigger Presses in Chapter 6 for more information 2 4 Programmer s Manual Speaker Applications can make
72. fig gt uchEnableCLSIEdit SCN_DISABLE CDBconfig gt uchEnableNOTISEdit SCN_DISABLE Save values sStatus scnSetCodabarInfo CDBconfig if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 75 senSetCode128Info 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls senGetCode128Info 3 Sets the values in the CODE128INFO data structure 4 Calls scnSetCode128Info When the application disables the scanner the configuration values go back to the defaults Syntax short far scnSetCodel 28Info LPCODE128INFO IprCodel28Info Parameters lorCode128 Info A pointer to a CODE128INFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 76 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPCODE128INFO config1 28 Code 128 data struct sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else Get config s
73. hen the Main menu appears press GD then quickly If you don t do it quick enough the menu scrolls off the screen 4 When the Startup menu appears press then Cie Online Passthrough running appears on the printer display 5 Connectthe PC and printer with a cable and send formats to the printer through the COM port To exit Online Passthrough reboot the printer Writing Applications Although you can write your application using any 16 bit compiler the libraries included in the SDK only work with Microsoft C C If you are using Visual C specify MS DOS application EXE for the project type If you plan to include the diagnostics program in the disk image be sure to write the application so that the end users cannot accidentally get into the program 3 2 Programmer s Manual Building Applications 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 To build use either the menu choices in the C C development environment or the following DOS prompt commands cl to compile and or link link to link only Refer to your C C documentation for more information Compiling Applications Although you may also use other options when compiling you must specify AL use the large memory mod
74. ication cannot communicate with the scanner Example See scnCloseScanner for an example 4 68 Programmer s Manual scnOpenScannerShared 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 This function allows the serial port to be shared for scanning and serial communications unlike scnOpenScanner There may be a slight delay when enabling the scanner for the software to determine the scanner type being used Because this function allows the serial port to be shared application does not need to enable and disable the scanner repeatedly to free the serial port for RS 232 communications It can enable the scanner at the beginning of processing and disable the scanner at the end of processing Using this function has the benefit of eliminating processing delays enabling and disabling the scanner repeatedly making the application run faster The application must call this function before it calls any other scanner function unless it uses scnOpenScanner Syntax short far scnOpenScannerShared void Parameters None Function Reference 4 69 Return Values 0 Successful 1 The scanner is already enabled 2 No scanner is installed or the application cannot communicate with the scann
75. id main void int isavedmode 0 Saved mode int ilnput 0 Key entered kbdSetAlpha Set Lower case Alpha Savedmode kbdGetMode Save the current mode kbdSetCaps Set Upper case Alpha printf Press an alphabetic nkey Test the mode while _kbhit Input _getch printf nYou pressed c n ilnput kodRestoreMode isavedmode Return to prev mode 4 6 Programmer s Manual printf nPress the same nkey Test the mode while _kbhit iinput _getch printf nYou pressed c n ilnput Function Reference 4 7 kbdSetCaps Description Changes the keypad s data entry mode to Upper case Alpha mode Syntax void kodSetCaps void Parameters None Return Values None Example See kbdSetAlpha for an example 4 8 Programmer s Manual kbdSetFunct 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 lt stdio h gt include lt conio h gt include mmsultra h void main void int ilnput 0 Prompted input int Num 0 of labels to print kodSetNormal Set Normal mode kodSetFunct Set Function Key mode printf Press 5 to print nlabels n Get input F5 ilnput _getch if Input 0x00 kodClrFunct iInput __getch if Input Ox3F Get of labels print
76. ing check digits for D 2 of 5 bar codes You can specify one or two lengths a range of lengths or that any length is valid Enter values as follows Option uchLength1 uchLength2 1 Length Value 0 2 Lengths Higher Value Lower Value Range Min Value Max Value Any length 0 0 Selecting the any length option may lead to mis scans Default 12 uchLength1 and O uchLength2 GENERALINFO The GENERALINFO data structure contains general scanner configuration information To read these values applications call scnGetGenerallnfo to set these values they call scnSetGenerallnfo typedef struct _Generallnfo unsigned char uchLaserOntTime unsigned char uchPowerMode unsigned char uchtTriggerMode unsigned char uchSameSymbolTMO unsigned char uchLinearCodeSecur unsigned char uchBiDirRedun GENERALINFO Description uchLaserOnTime The maximum time in increments of 1 seconds of ascan Values are 5 99 Default 30 uchPowerMode Specifies whether power remains on or the scanner goes into low power mode after a scan If uchTriggerMode is 1 Continuous and uchPowerMode is 1 Low Power the scanner remains continually on Values are 0 Continually On 1 Low Power Default 7 uchTriggerMode The method that starts the scanner If uchTriggerMode is 1 Continuous and uchPowerMode is 1 Low Power the scanner remains continually on Values are 0 Trigger 1 Continuous always on Default 0 Data Structure Refere
77. inting in Chapter 6 for more information Syntax short far pclStatus void Parameters None Return Values 0 The Print subsystem is ready 7 The Print subsystem is busy 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 Packet Reference Manual for more information Example See pcIGetOnDemandSensor for an example 4 42 Programmer s Manual pclWrite Description Writes MPCL packets to the Print subsystem You can send no more than one packet ata time It must be complete 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 lochBuffer unsigned short usCount Parameters lochButfer A pointer to the data to write usCount The number of bytes to write The maximum size is 64K Return Values 10 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 Packet Reference Manual tor more information Example See pcIGetOnDemandSensor for an exam
78. ion 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 This function directs the serial port to the scanner making external RS 232 communications unavailable unlike scnOpenScannerShared until the application disables the scanner with scnCloseScanner There may be a slight delay when enabling the scanner for the software to determine the scanner type being used Because the scanner takes over the serial communications port the application should disable the scanner immediately before using the port for serial communications and enable it immediately afterwards When possible the application should use scnOpenScannerShared to avoid processing delays enabling and disabling the scanner repeatedly scnOpenScanner also saves the serial port s configuration baud parity data bits stop bits to restore when the application disables the scanner The application must enable the scanner before configuring it The application must call this function before it calls any other scanner function unless it uses scnOpenScannerShared Syntax short far scnOpenScanner void Function Reference 4 67 Parameters None Return Values 0 Successful 1 The scanner is already enabled 2 No scanner is installed or the appl
79. ion manual may cause harmful interference to radio communications Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense CANADIAN D O C WARNING This digital apparatus does not exceed the Class A limits for radio noise emissions from digital apparatus set out in the Radio Interference Regulations of the Canadian Department of Communications Le pr sent appareil num rique n met pas de bruits radio lectriques d passant les limites applicables aux appareils num riques de la classe A prescrites dans le R glement sur le brouillage radio lectrique dicte par le minist re des Communications du Canada Trademarks Monarch Pathfinder Ultra are registered trademarks of Monarch Marking Systems Inc 6037EX is a trademark of Monarch Marking Systems Inc Paxar is a trademark of Paxar Americas Inc Microsoft and MS DOS are registered trademarks of Microsoft Corporation Windows and Windows 950 are registered trademarks of Microsoft in the U S and other countries CG Triumvirate Bold is a trademark of AGFA Corporation Datalight is a registered trademark of Datalight Inc ROM DOS is a trademark of Datalight Inc SystemSoft is a registered trademark of SystemSoft Corporation IBM is a registered trademark of International Business Machines Corporation Paxar Americas Inc 170 Mona
80. irectory as the application s 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 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 Packet Reference Manual for more information See pclGetErrorMsg for an example Function Reference 4 37 pclPaperlinfo Description Retrieves information length width and type about the current supplies Syntax void far pclPaperlInfo unsigned short far lpusStockLength unsigned short far lpusStockWidth unsigned short far lpusStockType Parameters IpusStockLength Pointer to the supply length in hundredths of an inch Returned values are 55 400 IpusStockWidih Pointer to the supply width in hundredths of an inch Returned values are 720 750 and 200 IpusStockType Pointer to the supply type Returned values are MMS_LOW_ENERGY Paper MMS_MEDIUM_ENERGY Fax MMS_HIGH_ENERGY Synthetic If you are using linerless supplies experiment with these values to see which one achieves the best results Return Values None Example See pclPaperSetup for an example 4 38 Programmer s Manual pclPaperSetup Description Gives information to the Print subsystem about the su
81. ither 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 The display is not compatible with any standard IBM PC display adapter There is no program accessible video memory Display Pages The printer has two display pages numbered 0 1 An application can manipulate any display page regardless of the current page To manipulate the display use the functions with the vid prefix see Chapter 4 Function Reference Each display page has its own cursor Only one page appears on the display ata time To ensure the application begins on the same display page every time use vidS etP age to set the display page at the application s beginning display pages are empty at the application s beginning use vidS croll to clear the pages at the application s beginning and end 2 2 Programmer s Manual If the application writes to a display page other than the current one the displayed information does not appear until the application uses vidSetPage to switch to the new display page the current display page the displayed information appears immediately You may want the application to write messages longer than 20 characters to the display or have a command move the cursor If you use standard C functions such as print
82. kDgtAlgorithm Default 0 uchXmitCheckDigit Enable disable the requirement to transmit data with the check digit Default SCN_DISABLE uchChkDgtAlgorithm Specifies the check digit algorithm to use Values are 0 Mod 10 Mod 11 1 Mod 10 Mod 10 Default 1 Data Structure Reference 5 15 UPCEANINFO 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 unsigned char uchEnableUPCE unsigned char uchEnableUPCE1 unsigned char uchEnableEAN8 unsigned char uchEnableEAN 13 unsigned char uchEnableBookEAN unsigned char uchEnableSupps unsigned char uchEnableSuppRedun unsigned char uchXmitUPCAChkDgft unsigned char uchXmitUPCEChkDgft unsigned char uchXmitUPCE1ChkDgt unsigned char uchUPCAPreamble unsigned char uchUPCEPreamble unsigned char uchUPCE1Preamble unsigned char uchCvtUPCEtOUPCA unsigned char uchCvtUPCEItoUPCA unsigned char uchEAN8ZeroExtend unsigned char uchCvtEAN8toEAN13 unsigned char uchSecurityLevel unsigned char uchEnableCouponCode UPCEANINFO Description uchEnableUPCA Enable disable the ability to scan UPCA bar codes Default SCN_ENABLE uchEnableUPCE Enable disable the ability to scan UPCEO bar codes Default SCN_ENABLE 5 16 Programmer s Manual uchEnableUPCE1 uchEnable
83. kLength unsigned short far IpusStockWidth Parameters IpusStockLength Pointer to the calibrated supply length in hundredths of an inch Returned values are 55 400 IpusStockWidih Pointer to the calibrated supply width in hundredths of an inch Returned values are 0 not calibrated 720 150 or 200 4 18 Programmer s Manual Return Values 10 Successful Non zero An error occurred For errors between 703 793 the operator corrects the printer condition Then the application must call pclClearError to resetthe Motion Control subsystem Refer to the MPCL Packet Reference Manual tor more information Example See pclPaperSetup for an example Function Reference 4 19 pclClearError Description 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 Parameters None Return Values None Example See pclFeed for an example 4 20 Programmer s Manual pclClose Description 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 pclC
84. key mode activating 4 9 deactivating 4 2 functions kbdClrFunct 4 2 Index 5 6 Index kbdGetMode 4 3 kbdRestoreMode 4 4 kbdSetAlpha 4 6 kbdSetCaps 4 8 kbdSetFunct 4 9 kbdSetNormal 4 11 pclBatteryOkToPrint 4 12 pciCalibrate 4 13 pclCalibratePaper 4 18 pciClearError 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 pciPaperlnto 4 38 pclPaperSetup 4 39 pciStatus 4 42 pclWrite 4 43 reference 4 1 scnCloseScanner 4 44 scnGetBarCodeType 4 46 scnGetch 4 48 scnGetche 4 50 scnGetCodabarInfo 4 52 scnGetCode128Info 4 53 scnGetCode39Info 4 54 scnGetCode93 Info 4 55 scnGetD2of5 Info 4 56 scnGetGenerallnfo function 4 57 scnGetl2of5Info 4 58 scnGetMSIInfo 4 59 scnGets 4 60 scnGetScaninfo 4 62 scnGetScannedData 4 63 scnGetUPCEANInfo 4 66 scnOpenScanner 4 67 scnOpenScannerShared 4 69 scnScannerHit 4 72 scnSetCodabarlnfo 4 74 scnSetCode128Info 4 76 scnSetCode39Info 4 78 scnSetCode93Info 4 80 scnSetD2of5 Info 4 82 scnSetGenerallnfo 4 84 scnSetl20f5Info 4 86 scnSetMSIInfo 4 88 scnSetScaninfo 4 90 scnTrigger 4 95 scnUPCEANInfo 4 92 spkBeep 4 96 sysGetBlOSVersion 4 97 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
85. lay page behind the scenes and display it when ready The printer subsystem that controls how paper feeds through the printer Monarch Printer Control Language This language contains commands that drive the printer Refer to the Packet Reference Manual for more information A unit of MPCL commands For example to print a particular label the application writes a particular group of MPCL commands to the print subsystem This group is enclosed in braces and is known as a packet Refer to the Packet Reference Manual for more information The part of the printer that controls printing The MS DOS 6 22 compatible operating system that the printer runs Datalight manufactures it Glossary B 1 Scanner Buffer Stock Type Supplies Video Mode B 2 Programmer s Manual Definition Software Development Kit This kit includes everything you need libraries utilities documentation etc to create printer applications 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 Supplies can be made of different stock types See Stock Type in this glossary for more information The 20 columns on the printer s display INDEX 1 1223 scanner configuration CODABARINFO data structure 5 2 CODE128IN
86. le the requirement to transmit UPCEO bar codes with the check digit Default SCN_ENABLE Enable disable the requirement to transmit UPCE1 bar codes with the check digit Default SCN_ENABLE Specifies how to transmit lead in characters for UPCA bar codes Values are 0 Do not transmit 1 Transmit system character 2 Transmit system character and country code Default 1 uchUPCEPreamble uchUPCE1Preamble uchCvtUPCEtoUPCA uchCvtUPCE1toUPCA uchEAN8ZeroExtend Description Specifies how to transmit lead in characters for UPCEO bar codes Values are 0 Do not transmit 1 Transmit system character 2 Transmit system character and country code Default 1 Specifies how to transmit lead in characters for UPCE1 bar codes Values are 0 Do not transmit 1 Transmit system character 2 Transmit system character and country code Default 1 Enable disable the requirement to convert UPCEO bar codes to UPCA bar codes before transmission After conversion the bar code is affected by UPCA programming selections Default SCN_DISABLE Enable disable the requirement to convert UPCE1 bar codes to UPCA bar codes before transmission After conversion the bar code is affected by UPCA programming selections Default SCN_DISABLE Enable disable the addition of five leading zeros to scanned EAN8 bar codes to make them compatible with EAN13 bar codes Values are 1 enable or 2 disable Default SCN_DISABLE D
87. lication buffer short sStatusl 0 Command calls status int ilnput 0 Trigger input sStatus scnOpenScanner Enable scanner if sStatusl 2 printf Scanner open error d sStatus1 else Perform scan printf Press trigger to nscan n iInput __getch if Input 0 Input _getch if input 0x85 pStatus2 scnGets cBuffer if pStatus2 NULL printf Scanner buffer read error n else spkBeep 1 1000 Beep for success Display result printf Scan data n s n cBuffer sStatus scnCloseScanner Disable scanner Function Reference 4 61 scnGetScanlInfo 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 function is invalid with LMSSCEN LIB See SCANINFO in Chapter 5 to learn more about the SCANINFO data structure Syntax short far scnGetScanInfo LPSCANINFO IprScaninfo Parameters IprScanInfo A pointer to a SCANINFO data structure Return Values 10 Successful 9 The scanner is disabled Example See scnSetScaninfo for an example 4 62 Programmer s Manual scnGetScannedData Description Retrieves the scanner buffer s contents as a null terminated string placing them in a programmer defined
88. lies A Checks whether the battery is charged enough for printing B Loads a batch packet and prints the format C Waits until the label prints by checking the status repeatedly until it returns something other than busy 4 Closes the Print subsystem Sample 2 Function Prints using the on demand sensor Algorithm 1 Initializes the Print subsystem without allocating font storage memory 2 Loads a format packet This format defines the feed mode as on demand 3 Checks whether the battery is charged enough for printing 4 Loads a batch packet and prints the format A 2 Programmers Manual 5 Waits until the label prints by checking the status repeatedly until it returns something other than busy 6 Closes the Print subsystem Sample 3 Function Prints a strip of labels Algorithm 1 Initializes the Print subsystem without allocating font storage memory 2 Loads a format packet 3 Performs the following until an error occurs A Checks whether the battery is charged enough for printing B Prompts the operator to enter a quantity and builds the batch dynamically with that number and other data C Builds the batch and prints the label s D Waits until the labels print by checking the status repeatedly until it returns something other than busy 3 Closes the Print subsystem Sample Applications A 3 Sample 4 Function Prints using fonts and formats loaded with pclOpen Algori
89. ll Character Set 8 pt 1007 eos Bold Condensed Full Character Set 10 pt Printer Features 2 7 noo Bold Condensed Full Character Set 12 pt 1 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 With fonts 1012 and 1013 the space character is only 70 as wide as the other characters Using Non Resident Fonts To use a non resident font or a font you have created with the MPCL Toolbox Font Utility the application must 1 Initialize the Print subsystem by calling pcllnit See pclinit in Chapter 4 for more information 2 Open the font file with pclOpen The base font files are located in the SDK s Font sub directory 2 8 Programmer s Manual Scanners Each printer comes with either of two bar code scanners SE 923 SE 923HS Using the Scanners To use the either scanner the application must 1 Enable the scanner with scnOpenScanner or scnOpenScannerShared scnOpenScanner takes over the printer s serial port preventing other RS 232 communications but scnOpenScannerShared shares the port Therefore when using scnOpenScanner the application should disable the scanner immediately before serial communications
90. lose void Parameters None Return Values None Example See pclFeed for an example Function Reference 4 21 pclFeed Description Feeds a label through the printer Syntax unsigned short far pclFeed void Parameters None Return Values 0 Successful 703 798 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 Packet Reference Manual for more information 4 22 Programmer s Manual Example include lt stdio h gt include lt conio h gt include mmsultra h void main void PRINTINIT pConfig Print data structure unsigned short usStatus 0 Battery level short sStatus 0 Command call status sStatus pclinit NULL Start Print subsystem if sStatus 0 printf Init Failed nError Ad sStatus else usStatus pclGetBatteryLevel Get the battery level if usStatus gt 711 f level OK usStatus pclFeed Feed supplies if usStatus 0 printf Feed Error press any key when printer is reset _getch poclClearError else printf Charge battery Display low level msg pclClose Close Print subsystem Function Reference 4 23 pclGetBatteryLevel Description Retrieves the NiCd battery s level This battery is located in the printer s handle It is good programming practice to check the b
91. messages are longer than 20 characters An application must format the message before displaying it to avoid truncation See Display in Chapter 2 for more information Error numbers that this function can retrieve must be positive Zero indicates success and negative numbers are ROM DOS errors Syntax char far far pclGetErrorMsg unsigned short usMsgNo Parameters usMsgNo The error number Return Values Pointer to a null terminated Successful message string 0 Unsuccessful 4 28 Programmer s Manual Example include lt stdio h gt include mmsultra h void main void short sStatus 0 Command calls status short usStatus 0 Command calls status char far cStatus NULL Error message PRINTINIT pConfig Print data structure sStatus pclinit NULL Start Print subsystem if sStatus 0 printf Init Failed nError d sStatus else if IpciBatteryOkToPrint Check battery printf Low battery error else Open file usStatus pclOpen B MPCL TEST FAB if usStatus gt 0 cStatus pclGetErrorMsg usStatus printf Fs n cStatus pclClose Close Print subsystem Function Reference 4 29 pclGetOnDemandSensor Description Determines the on demand sensor s current state This sensor is an option for the printer Syntax unsigned short far pclGetOnDemandSensor void Parameters None Return Values 7 The sensor is blocked 0 The sens
92. msultra h void main void int cStyle 32 Cursor style Prompt user printf Choose cursor type nA block nB Underscore cStyle _getch Get input switch cStyle Take action case A vidSetCursorlype 0 6 break case B vidSetCursorlype 7 7 break default printf nInvalid input 4 110 Programmer s Manual vidSetMode 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 0 Return Values None Example See pclCalibrate for an example Function Reference 4 111 vidSetPage 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 display pages are clear use vidScroll to clear the pages at the application s beginning 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 Strings written to the current page appear immediately Syntax void far vidSetPage short sPage Parameters sPage Display page For 4 line printers values are 0 3 For 8 line printers values are 0 7 The default is O Return Values
93. nce 5 9 Description uchSameSymbolTMO 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 Values are 1 99 Default 10 uchLinearCodeSecur The scan security level for linear bar codes Values are 1 4 Select a higher level for lower quality bar codes See Scan Security Levels for more information Default 1 uchBiDirRedun Enable disable the requirement to scan bar codes in both directions forward and reverse Default SCN_DISABLE Scan Security Levels The following table describes the security levels used with the uchLinearCodeSecur parameter Level Number Description 1 The following bar code types provided they meet the specified length requirements must be scanned successfully twice Codabar Any length MSI 4 characters or less D2of5 8 characters or less 12 of 5 8 characters or less 2 All bar code types of all lengths must be scanned successfully twice 5 10 Programmer s Manual Level Number Description 3 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 MSI 4 characters or less D2of 5 8 characters or less 12 of 5 8 characters or less 4 All bar code types of all lengths must be scanned successfully three times Data Structure Reference 5 11 IZOF5INFO The IZOF5INFO
94. nfiguration values go back to the defaults Syntax short far scnSetD2of5Info LPD2OFSINFO IprD2of3Info Parameters lorD2of5Info A pointer to a D2OF5INFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 82 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPD2OFSINFO D25config D 2 of 5 data structure sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else sStatus scnGetD2of5Info D25config Get config if sStatus 0 printf Scanner is disabled else Set values D25config gt uchEnable SCN_ENABLE D25config gt uchLength 1 0 D25config gt uchLength2 0 Save values sStatus scnSetD2o0f5Info D25config if sStatus 0 printf Error setting values sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 83 scnSetGenerallinfo 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 To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetGenerallnfo 3 Sets the values in the GEN
95. oaer sesoncnacvacesaez usuada ingadgewescdeeuegeddeqededs sougacend 4 46 SCMGOUC Maes ccc co E AEA E ET 4 48 SCNGOLENG near ad 4 50 scnGetCod bar Oi 4 52 SCHGOIGOUG1 20010 in 4 53 scnGetCode39lnfo A A ae A rrr nt rerent 4 54 senGialCode 93 Into ani i 4 55 ScnGoelDZ0S Miu aca a 4 56 SCNGOPGONGLal Mil EE E EE E E 4 57 Ac O 4 58 sore Mor deseos sc 4 59 AAE A A O A O 4 60 SCNGOISCAMINIO sra 4 62 SONO CAMADA A 4 63 SCHGGIUPOEANINIO dai 4 66 SCHOEN SCAMNGN a nd 4 67 scnOpenScannerShared esuarsecioaesasi nonnnon accent 4 69 SCHSCANMOMAIL vest ues da 4 72 Table of Contents SCNSetCodabarlnfo sotesne aikoen kreias kracan skracanie 4 74 sconSetCodel 2 tc it AAA daw Dau Hw iaia oe 4 76 SENSO COEN ocio 4 78 SENSEICOdG9S Orar 4 80 JAI A Wd a aE E E E a aiT 4 82 SENSATA eoe aee EE ARE E 4 84 A ase aena aaa a E Ea 4 86 sens sarral Ailend atu A dote 4 88 SONS Ca abia 4 90 ScroSotUPGEANINTOS vacia AA 4 92 SCM MIQUE cesos edo NEE Teia 4 95 A Sa Sete elect ahs E EEE 4 96 SyYSGECIBIOSVERSION coi a 4 97 VIIBACK OMS 4 99 VIG OMS A sd E TEE E 4 100 ES 4 101 A E 4 102 MARS Ai a OA 4 104 MAREA CUPO Narnia 4 106 vas crol astas aaa aa 4 107 MUSEU IPs ib ebebibis 4 109 vidSetMo deee hon eE nado beaded A EAE E 4 111 VIDS CEP AGE ice scesaizescanuachegucaedccsuacdeescnedeaussascacinac outaedsoctaesceumensiess 4 112 NO 4 114 A A A Rotel 4 116 Data Structure Reforene 2c c c10sccccsesccessscccessccnesstecessstonsecstenssenesssccasss 5 1 GODABARI
96. or is not blocked 703 798 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 Packet Reference Manual for more information 4 30 Programmer s Manual Example include lt conio h gt include lt stdio h gt include lt string h gt include mmsultra h void main void PRINTINIT pConfig Print data structure short sStatus 0 Command calls status char cFormat 100 Format to print sStatus pclinit NULL Start Print subsystem if sStatus 0 printf Init Failed nError d sStatus else if IpciBatteryOkToPrint Check battery printf Battery too low else Write format 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 strcat cFormat sStatus pclWrite cFormat strlen cFormat Function Reference 4 31 if sStatus 0 printf Format Write error d sStatus else Start batch 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 Wait until done sStatus pclGetOnDemandSensor Check sensor switch sStatus Display result case 0 printf nNot blocked break case 1 printf nBlocked break default printf Er
97. or new lines when scrolling Values are 0x07 Normal video 0x70 Reverse video Function Reference 4 107 Return Values None Example include lt stdio h gt include lt conio h gt include mmsultra h void main void Prompt user printf Press Enter to nclear the display nin reverse video _getch Read Enter vidScroll 0 0 3 11 0 0x70 Clear scr in rev video 4 108 Programmer s Manual vidSetCursorType Description Defines the cursor style to use The display consists of 4 or 8 rows depending on the printer you have Each row consists of 8 horizontal lines for a total of 32 or 64 lines The cursor at most is as tall as a display row So it has up to 8 horizontal lines numbered 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 Due to this gap the application should use cursor line 7 only as a single line cursor Syntax void far vidSetCursorType short sStart short sEnd Parameters sStart The cursor s top line Values are 0 7 The default is 7 sEnd The cursor s bottom line Values are 0 7 The default is 7 Return Values None Function Reference 4 109 Example include lt conio h gt include lt stdio h gt include m
98. ory Parameters directory The name and optionally the path of the new directory Example umd backups creates a subdirectory to the current directory called backups on the printer 7 20 Programmer s Manual urd 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 urun Description Runs a DOS command or program on the printer UServe runs beneath this offshoot task When the command or program ends UServe is still running Running this command is the one case of where you would use the printer rather than only using UClient If you run a program such as Diagnostics on the printer Command Failed Did not receive a response from the Ultra appears on the UClient screen This error is nothing to worry about It should not occur though when running DOS commands with urun Syntax urun command Parameters command The command or program name along with any necessary parameters Using UServe and UClient 7 21 Example urun diag runs the printer s diagnostics program as an offshoot task from UServe uview 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 Example uview test tx
99. ows 95 Network Notes Directory Names The printer does not recognize file names longer than 8 characters not including the extension 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 Include a complete path when copying The default is that the file is saved in the root directory Printer Features 2 15 2 16 Programmer s Manual DEVELOPING APPLICATIONS EJ Developing applications is a long detailed process You cannot just write the application code You must also understand the whole picture For example you must create MPCL packets and assess the application s memory needs This chapter describes this process Following is a summary 1 Create any needed MPCL packets if your application prints labels Write the application Build compile and link the application Use UServe and UClient to copy files to the printer Test the application Ps UBA oe BS Train the end users Developing Applications 3 1 Creating MPCL Packets An application prints labels by submitting MPCL packets to the printer Refer to the MPCL Packet Reference Manual for more information To test your packets without writing an application use the Online Passthrough Utility 1 Press the and On Off keys at the same time 2 When the logo screen appears release the key 3 W
100. pecific command led Changes the directory on the PC Idel Deletes a file on the PC Idir Lists details about files and or directories on the PC as specified Imd Creates a directory on the PC Ird Deletes a directory on the PC Iwd Displays the path to the current directory on the PC open Puts the PC in a communications ready state ping Confirms that the open PC printer connection is valid put Copies a file from the PC to the printer putbios Copies a BIOS binary file from the PC to the printer puttrueffs Copies a TrueFFS binary file from the PC to the printer quit Exits UClient reboot Restarts the printer Using UServe and UClient 7 5 Command Description setbaud Sets the baud rate for communications between the printer and the PC overriding the default set from UClient s Connection menu setport 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 ucd Changes the directory on the printer udel Deletes a file on the printer udir Lists details about files and or directories on the printer as specified udiskfree Displays the size of a printer drive and the amount of available space it has umd Creates a directory on the printer urd Deletes a directory on the printer urun Runs a DOS comm
101. ple Function Reference 4 43 scnCloseScanner 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 this function sets the serial communications port back to external RS 232 connection mode lt also restores the serial port configuration settings baud rate parity data bits and stop bits saved when the application enabled the scanner Syntax short far scnCloseScanner void Parameters None Return Values 0 Successful 1 The scanner was already disabled 4 44 Programmer s Manual Example include lt stdio h gt include mmsultra h void main void short sStatus 0 sStatus scnOpenScanner if sStatus 2 Command calls status Enable scanner printf Scanner error d sStatus else Scan Bar Codes sStatus scnCloseScanner Disable scanner Function Reference 4 45 scnGetBarCodeType 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 Syntax short far scnGetBarCodeType void Parameters None Return Values Th
102. plete help Description Displays a list of available commands or help information about a specific command Syntax help command Parameters commana The name of a command Example help Ird displays the following on the PC Command LRD Description local remove directory Parameters lt local directory gt 7 8 Programmer s Manual Icd Description Changes the directory on the PC Syntax led 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 Icd c backups changes the current directory to c backups and displays this path to confirm Idel Description Deletes a file on the PC Syntax Idel filename Parameters filename The name and optionally the path of a file Example Idel autoexec bat deletes autoexec bat on the PC and displays Deleted File autoexec bat to confirm it Using UServe and UClient 7 9 Idir 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 Idir filedirspec Parameters filedirspec The name and optionally the path of a file or directory The default is the current directory Example Idir projects displays the contents of the projects directory on the PC such as the following 03 14 2
103. pplies 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 pclCalibrate Syntax unsigned short far pclPaperSetup unsigned short usStockLength unsigned short usStockWidth unsigned short usStockType Parameters usStockLength The supply length in hundredths of an inch Values are 55 400 usStockWidth The supply width in hundredths of an inch Values are 720 150 and 200 usStockType The supply type Values are MMS_LOW_ENERGY Paper MMS_MEDIUM_ENERGY Fax MMS_HIGH_ENERGY Synthetic If you are using linerless supplies experiment with these values to see which one achieves the best results Function Reference 4 39 Return Values 10 Successful 703 793 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 Packet Reference Manua for more information Other non zero An error occurred Refer to the MPCL Packet Reference Manual for more information Example include lt stdio h gt include lt stdlib h gt include mmsultra h void GetSupplyType unsigned short void GetStockLength unsigned short void GetStockWidth unsigned short unsigned short main void unsigned short usStatus Printer completion
104. printer serviced Using UServe and UClient 7 23 Message Could not get the file Could not put the file Could not remove directory Could not save file locally Did not receive a response from the Ultra Error Running command on Ultra Returned Error xxx 7 24 Programmer s Manual Solution Verify that a valid PC printer connection exists If so verify the syntax of the command and retry it Verify that a valid PC printer connection exists If so verify the syntax of the command Then retry the command 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 Then retry the command From the user perspective a command may finish running but there can still be processing going on behind the scenes before the command is truly finished A timeout can occur during this timeframe Therefore when a timeout error occurs check to see if the command actually finished or not before trying to correct the problem For example if the error occurred on a put verify that the file copy completed A ROM DOS error occurred on the printer Retry the command If the same error occurs re boot the printer and or have it serviced Message Invalid Parameters for command No Connection
105. rch Lane Miamisburg OH 45342 TABLE OF CONTENTS Introduction a 1 1 System Requirements 2525 5 ASA A A 1 2 Hardware Requirements s s cscess caseac Seacsoqsdonten sxectanseneseageevancsneecase 1 2 Software Requirements ee 1 2 SDK COM oe See Beech SOR recede atas 1 3 Related Documentation 2 2 c032 4c nese aieed aiid erated tierce 1 4 Printer ECALUFO usaran curas dani a id ea 2 1 DIS Pl ts liada 2 2 Display Paleo piola inie eai ia aaen Aa akaroa 2 2 ECD UNE cons ek hel eh e oe DT Da ach EE EE 2 3 A A A E aeutensseesess 2 4 A A a T 2 5 o 26 255 ciate ites oh ce eke ak ett E ech ioe aati vasa tke alate sake 2 5 OMS ited a eens taken ande canted 2 7 Using Non Resident FOmts isis 55s ecaegeuesavgousedsaesseacadeguedsenetacs 2 8 SCANM ONS esl orea e elias pan eine eves e usenet eared eat 2 9 Using the Scanners cocida 2 9 Scanner Function Overview cecccseeeeeeceeeeeeeeeeeeeeeeeeeeanaees 2 10 O 2 11 Normal BO a A See ads ae te ae ea ea 2 11 Display COntrol A beetle ho hot Genel eset apa rea ERE 2 12 BOO CEOS secs oar o E At ad 2 12 Booting froma PO ween oa aia ian ara aes eae aes ai 2 13 Startup Men a A O o E 2 14 Table of Contents Windows 95 Network NoteS cccccceecceceeecceceenececeeeeeeceeneeeeetarers 2 15 Directory Names tai ee eee weit eee eg 2 15 Copying Data from the Printer to PC ccseeeeeseesseeeeeeeeaeeeees 2 15 Developing Applications ococicocananconaninccannaconanooiananconan
106. rint 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 When setting up a method to print multiple labels you must specify one of the following quantity peel mode on peel mode feed mode 6 2 Programmer s Manual Quantity Use either or both of the following methods to control the quantity of labels printed Setup a print loop by placing any C C loop construct around the code that prints the labels The number of times the loop executes is the number of labels printed Adjust the batch packet s quantity parameter before submitting the batch Refer to the Packet Reference Manual for more information Peel Mode Non Peel Mode In peel mode the printer separates labels from the backing paper which allows you to apply labels immediately 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 Refer to the Equipment Manual tor more information You cannot use linerless supplies in peel mode Feed Mode Feed mode determines how the printer prints the labels There are two feed modes De
107. rinter See Example File Copy to get an idea of how a file copy might work UClient Commands explains these commands in detail 4 Select C ose from UClient s Connection menu to sever the PC printer connection 5 Select Ex t from UClient s File menu to exit UClient 6 Type X on the printer s keypad to exit UServe Example File Copy Suppose that the application consists of a number of files in a directory called App on the PC AUTOEXEC BAT CONFIG SYS Several BAT files The application s EXE file FORMAT FMT GR1 GPH Several GPH files Several TXT files All of them should go in the root D directory 7 4 Programmer s Manual Following is the sequence of commands you would use to copy these files and create this directory structure on the printer NOTE This command sequence assumes it starts in the c root directory on both the printer and PC 1 ucd d 2 Icd app 3 put Change the printer s directory from c to d Change the PC s directory to c app Copy all of the files from c app on the PC to d on the printer UClient Commands Following are the UClient commands Command Description close Closes the communication connection between the PC and printer by taking the PC out of a ready state get Copies a file from the printer to the PC help Displays a list of available commands or help information about a s
108. rints labels SAMPLE4 C in the Samples sub directory illustrates loading multiple packets together 6 4 Programmer s Manual Building Packets Dynamically An application can use fixed packets or packets that change every time they are used such as in an application where the operator enters the quantity for the batch When packets change every time they are used the application must build the packet dynamically SAMPLE3 C in the Samples sub directory illustrates building packets dynamically Using the Scanner An application uses the printer s scanner to read bar codes as follows 1 Enable the scanner with scnScannerOpen or scnOpenScannerShared 2 If necessary configure the scanner using the scnGetxxx and scnSetxxx functions 3 Use any scanner function to operate the scanner These functions are described in Chapter 4 and all begin with an scn prefix 4 Disable the scanner with scnCloseScanner SAMPLE5 C in the Samples sub directory illustrates how to use the scanner Reading Trigger Pulls Pressing any key including pulling the trigger sends a code to the application for it to read The trigger emulates an F11 as an extended character code To read a trigger pull the application reads two characters lf the first character is a zero and the second is 0x85 the operator pulled the trigger SAMPLE1 C in the Samples sub directory illustrates reading trigger pulls Programming Techniques 6 5 Audio Visual
109. rm procedures loading supplies for example that may vary from the generic descriptions in the Equipment Manual You must give the Operators and or System Administrators application specific instructions if applicable Developing Applications 3 5 3 6 Programmer s Manual FUNCTION REFERENCE 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 Description Prefix Keypad Interface pcl Printing Interface scn Scanning Interface spk Speaker Interface sys System Interface vid Video Interface All functions in the same category begin with the same prefix The function names are case sensitive Function Reference 4 1 kbdClirFunct Description Changes the keypad s data entry mode to the mode in effect immediately before the application called kbdSetFunct Syntax void kbaCirFunct void Parameters None Return Values None Example See kbdSetFunct for an example 4 2 Programmer s Manual kbdGetMode 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 kodRestoreMode Syntax int kodGetMode void Parameters None Return Values 7 Numeric Normal mode 2 Upper case Alpha mode 4 Lower case Alpha mode 9 Function
110. ror press any key when reset _getch poclClearError pclClose Close Print subsystem 4 32 Programmer s Manual pclGetSupplyType Description Retrieves the current supply type Syntax unsigned short far pclGetSupplyType void Parameters None Return Values MMS_LOW_ENERGY Paper MMS_MEDIUM_ ENERGY Fax MMS_HIGH_ENERGY Synthetic 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 Packet Reference Manual tor more information Function Reference 4 33 Example include lt conio h gt include lt stdio h gt include mmsultra h void main void unsigned short usType 0 Supply type PRINTINIT pConfig Print data structure unsigned short usStatus 0 Battery level short sStatus 0 Command calls status sStatus pclinit NULL Start Print subsystem if sStatus 0 printf Init Failed nError Ad sStatus else usStatus pclGetBatteryLevel if UsStatus lt 711 Check battery printf Charge your battery else usType pclGetSupplyType Get supply type switch usType Display result case MMS_LOW_ENERGY printf Using regular paper break case MMS_MEDIUM_ENERGY printf Using fax paper break case MMS_HIGH_ENERGY printf Using synthetic paper break default printf Error press any k
111. s sWait Flag indicating whether to wait until the scan is complete Values are 10 Return immediately If the application uses this option the scan may still be in progress when the function returns to the application If so it must use scnScannerHit to determine when the scan ends 7 Wait until the scan is complete timed out or un decodable Return Values 10 Successful 9 The scanner is disabled 10 The scanner timed out Example See scnGetScannedData for an example Function Reference 4 95 spkBeep 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 sokBeep unsigned char uchDuration unsigned short usFrequency Parameters uchDuration The duration in tenths of a second Values are 7 10 usFrequency The frequency in hertz Values are 770 70 000 Return Values None Example See scnGets for an example 4 96 Programmer s Manual sysGetBlOSVersion Description Retrieves the BIOS version and build date The date string s format is mm dd yy The version string s format is Mmm ss where Mis the major version mm is the minor version and ss is the sub version For example 1 01 S Syntax int far sysGetBlOSVersion unsigned char far lpszVersion unsigned char far lpszDate Parameters lpszVersion Pointer to the BIOS version pszDate Pointer to the BIO
112. s UEconfig gt uchEnableUPCA SCN_ENABLE UEconfig gt uchEnableUPCE SCN_DISABLE UEconfig gt uchEnableUPCE1 SCN_DISABLE UEconfig gt uchEnableEAN8 SCN_DISABLE UEconfig gt uchEnableEAN13 SCN_DISABLE UEconfig gt uchEnableBookEAN SCN_DISABLE UEconfig gt uchEnableSupps 2 UEconfig gt uchEnableSuppRedun 10 UEconfig gt uchXmitUPCAChkDgt SCN_ENABLE UEconfig gt uchXmitUPCEChkDgt SCN_DISABLE UEconfig gt uchXmitUPCE1ChkDgt SCN_DISABLE UEconfig gt uchUPCAPreamble 2 UEconfig gt uchUPCEPreamble 0 UEconfig gt uchUPCEl1Preamble 0 UEconfig gt uchCvtUPCEtOUPCA SCN_DISABLE UEconfig gt uchCvtUPCEIltoUPCA SCN_DISABLE UEconfig gt uchEAN8ZeroExtend SCN_DISABLE UEconfig gt uchCvtEANStOEAN13 SCN_DISABLE UEconfig gt uchSecurityLevel 1 UEconfig gt uchEnableCouponCode SCN_ENABLE Function Reference 4 93 Save values sStatus scnSetUPCEANInfo UEconfig if sStatus 0 printf Scanner is disabled else Scan Bar Codes sStatus scnCloseScanner Disable scanner 4 94 Programmer s Manual scnTrigger 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 scnGetScannedData allows the application to read the scanned data Syntax short far scnTrigger short sWait Parameter
113. s a pointer to a CODE128INFO data structure containing the default values for each parameter If you change and set the parameters with scnSetCode1 28Info subsequent calls to scnGetCode128Info retrieve a pointer to a data structure containing the current values See CODE128INFO in Chapter 5 to learn more about the CODE128INFO data structure Syntax short far scnGetCodel 28Info LPCODE128INFO lprCodel 28Info Parameters lorCode128 Info A pointer to a CODE129INFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetCode128Info for an example Function Reference 4 53 senGetCode39Info 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 See CODE39INFO in Chapter 5 to learn more about the CODE39INFO data structure Syntax short far scnGetCode39Info LPCODE39INFO IprCode39Info Parameters lorCode39 nfo A pointer to a CODE39INFO data structure Return Values 10 Successful 9 Scanner is disabled Example See scnSetCode39Info for an example 4 54 Programmer s Manual senGetCode93Info Description LMSSCEN LIB only Retrieves a pointer to a CODE93INFO data structure containing the default values for each parameter
114. s not appear until the application sets that page as the current one with vidSetPage Strings written to the current page appear immediately Syntax void far vidPutStr char far IpchString unsigned char uchAttr short sPage Parameters pchString The string to write Bell backspace carriage return and line feed characters are invalid The string s length must be less than or equal to the number of remaining columns in the current row uchAttr The string s attribute Values are 0x07 Normal video 0x70 Reverse video sPage The display page For 4 row printers values are 0 3 For 8 row printers values are 0 7 Return Values None 4 102 Programmer s Manual Example include mmsultra h void main void vidSetPage 0 vidScroll 0 O 7 19 0 0x07 vidPutCursor 0 O 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 vidReadCA Description Reads a character and attribute from the current cursor location for the specified display page Syntax void far vidReadCA unsigned char far IpuchChr unsigned char far IpuchAttr short sPage Parameters IpuchChr A variable pointer to the character IpuchAttr A variable pointer to the character s attribute Returned values are 0x07 Normal video 0x7
115. s to fast mode include the 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 See LCD in Chapter 7 for more information Boot Options When DOS begins loading you have the following options for processing CONFIG SYS and AUTOEXEC BAT Bypass the files Be prompted whether to process each line of both files Process every line of both files 2 12 Programmer s Manual To choose the boot options 1 Turn on the printer while pressing until messages appear You must do this step Otherwise the date and time prompts the default wait for input without appearing on the screen When Starting ROM DOS appears the printer beeps You have approximately two seconds to do one of the following o Press Ga then to bypass both files The boot process continues with default configurations The printer also prompts you for the date and time o Press then to request a prompt at each line of both files Enter Y to process the line or N to bypass it Do nothing and let the printer process every line of both files Booting from a PC To boot the printer from the PC 1 Gather the following files on a floppy disk COMMAND COM REMDISK EXE e LCD COM AUTOEXEC BAT ata minimum this file must
116. scnCloseScanner Disable scanner Function Reference 4 87 scnSetMSIInfo Description LMSSCEN LIB only Saves the scanner configuration values the application set in the MSIINFO data structure See MSIINFO in Chapter 5 for a description of this data structure To configure the scanner the application 1 Enables the scanner with scnOpenScanner or scnOpenScannerShared 2 Calls scnGetMSlInfo 3 Sets the values in the MSIINFO data structure 4 Calls scnSetMSIInfo When the application disables the scanner the configuration values go back to the defaults Syntax short far senSetMSlinfo LPMSIINFO IprMSlInfo Parameters lporMSlinfo A pointer to an MSIINFO data structure Return Values 0 Successful 5 Invalid configuration value 9 The scanner is disabled 4 88 Programmer s Manual Example include lt stdio h gt include scan1223 h include mmsultra h void main void short sStatus 0 Command calls status LPMSIINFO MSIconfig MSI data struct sStatus scnOpenScanner Enable scanner if sStatus 2 printf Scanner error d sStatus else sStatus scnGetMSlInfo MSIconfig Get config if sStatus 0 printf Scanner is disabled else Set values MSIconfig gt uchEnable SCN_ENABLE MSIconfig gt uchLength 1 0 MSIconfig gt uchLength2 0 MSIconfig gt uchCheckDigits 0 MSIconfig gt uchXmitCheckDigit SCN_ENABLE MSIconfig gt uchChkDgt
117. scription Continuous The printer prints all labels together in one strip immediately with no operator intervention On Demand The printer prints the labels one at a time It does not print the next label until the operator removes the previous one You specify the feed mode in the batch packet with the batch control line s second parameter Refer to the Packet Reference Manual for more information Programming Techniques 6 3 Reprinting Labels To reprint labels submit the following batch with pclWrite B format U quantity where formatis the format number and quantity is the number of labels to print Pausing While Printing 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 The following code illustrates how to pause the application using pclStatus while iStatus pclStatus 1 See pclStatus in Chapter 4 for more information Loading Multiple Packets Together The application can load multiple packets together after it initializes the Print subsystem You can create one or more text files containing any number of packets and then pass those file names to pclOpen The application must call pclOpen only once per file If the packet file contains a format and a batch the call to pclOpen also p
118. status unsigned short usStockWidth Stk width in 1 100th inches unsigned short usStockLength Stk length in 1 100th inches unsigned short usSupplyType Supply type 0 2 unsigned short status 0 Print subsystem init status PRINTINIT rConfig Print subsystem data struct status pcllnit NULL Start Print subsystem if status 0 printf Init Failed nError d status exit 1 pclPaperlinfo amp usStockLength amp usStockWidth amp usSUpplyType GetSupplyType is a programmer written function GetSupplyType amp usSupplyType 4 40 Programmer s Manual If fax save setting do not calibrate if usSupplyType MMS_MEDIUM_ENERGY GetStockWidth amp usStockWidth usStatus pclPaperSetup usStockLength usStockWidth usSupplyType return usStatus usStatus pclCalibratePaper amp usStockLength amp uUsStockWidth if usStatus 0 poclClearError return usStatus GetStockLength is a programmer written function GetStockLength amp usStockLength GetStockWidth is a programmer written function GetStockWidth amp usStockWidth usStatus pclPaperSetup usStockLength usStockWidth usSupplyType pclClose Function Reference 4 41 pclStatus 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 Pr
119. t displays the contents of test txt Following is an example test txt This is a test Uwd Description Displays the path to the current directory on the printer Syntax uwd Parameters None 7 22 Programmer s Manual Example uwd displays the path to the current directory on the printer For example D DATA Troubleshooting Consult the following table if any errors occur while you are using UClient and UServe The messages can appear individually or together They are listed alphabetically Message Cannot find the requested file Command Failed Connection Closed to Ultra Connection to the Ultra has not been opened Could not create directory Could not delete file Could not establish a connection with the Ultra Solution Verify that the specified file exists and you spelled its name correctly Then retry the command Verify that a valid PC printer connection exists If so then verify the syntax and parameters of the command and re try it You tried to close a PC printer connection that already is closed Establish a PC printer connection See Establishing a PC Printer Connection There is not enough disk space to create a directory Free some space before trying again You specified a non existent file with the command Verify the spelling of the name and try again Reboot the printer and re establish the PC printer connection If this error still occurs have the
120. t on the PC that you have attached the cable to baudrate The baud rate for communications Example open coml 9600 opens the com1 port on the PC for communications at 9600 baud 7 12 Programmer s Manual ping Description Confirms that the open PC printer connection is valid Syntax ping Parameters None Example ping confirms that the PC printer communications are ready If it is a positive confirmation the UClient prompt reappears Otherwise an error message appears put Description Copies a file from the PC to the printer A PC printer connection must be in place before using this command NOTE Ifa file by the same name already exists it will overwrite the file without warning Syntax put pcfile printerfile Parameters pcfile The name and optionally the path of the file to copy You can use the wild card to copy multiple files i e txt to copy all txt files printerfilel The name and optionally the path of the file when placed in the printer If you do not specify this parameter the file name is assumed to be the same and the directory to be the current one Using UServe and UClient 7 13 Example put lookup txt copies lookup txt from the PC to the printer giving it the same name on the printer It also displays a listing of the file name and its size anda count of the bytes sent so far as the copy occurs When the copy finishes Complete appears For example
121. thm 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 to break out of the loop or 0 to calibrate supplies A Waits for the operator to press the trigger B Checks whether the battery is charged enough for printing C Loads a batch packet D Waits until the label prints by checking the status repeatedly until it returns something other than busy 4 Closes the Print subsystem Sample 5 Function Uses the scanner Algorithm 1 Enables the scanner 2 Waits for the operator to press the trigger Pressing breaks out of the waiting loop without performing a scan 3 Initiates a scan 4 Disables the scanner A 4 Programmers Manual Sample 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 Ese to break out of the loop or 0 to calibrate supplies A Initiates a scan B Checks whether the battery is charged enough for printing C Loads the batch prompting for a quantity D Waits until the label prints by checking the status repeatedly until it returns something other than busy 5 Disables the scanner 6 Closes the Print subsystem Sample 7 Function Scans and prints
122. tion for UPC EAN bar codes The data structure names are case sensitive Data Structure Reference 5 1 CODABARINFO 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 _Codabarlnto unsigned char uchEnable unsigned char uchLengthl unsigned char uchLength2 unsigned char uchEnableCLSIEdit unsigned char uchEnableNOTISEdit CODABARINFO Description uchEnable Enable disable the ability to scan Codabar bar codes Default SCN_DISABLE uchLength1 Specifies lengths including start and stop uchLength2 characters for Codabar bar codes You can specify one or two lengths a range of lengths or that any length is valid Enter values as follows Option uchLength1 uchLength2 1 Length Value 0 2 Lengths Higher Value Lower Value Range Min Value Max Value Any length 0 0 Default 5 uchLength1 and 55 uchLength2 5 2 Programmer s Manual Description uchEnableCLSIEdit 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 uchEnableNOTISEdit Enable disable the ability to strip the start and stop characters from Codabar bar codes Default SCN_DISABLE Data Structure Reference 5 3 CODE128INFO Th
123. transmit check digits with the data Default SCN_DISABLE Enable disable the requirement to convert 14 character 2 of 5 bar codes into EAN13 bar codes and transmit them as EAN13 bar codes To use this parameter enable uchEnable set the length to 14 and ensure the data has a leading zero and a valid EAN 13 check digit Default SCN_DISABLE Data Structure Reference 5 13 MSIINFO The MSIINFO data structure contains scanner configuration information about MSI bar codes To read these values applications call scnGetMSlIInfo to set these values they call scnSetMSIInfo typedef struct _MSIInfo unsigned char uchEnable unsigned char uchLength1 unsigned char uchLength2 unsigned char uchCheckDigits unsigned char uchXmitCheckDigit unsigned char uchChkDgtAlgorithm MSIINFO Description uchEnable Enable disable the ability to scan MSI bar codes Default SCN_DISABLE uchLength1 Specifies lengths for MSI bar codes You uchLength2 can specify one or two lengths a range of lengths or that any length is valid Enter values as follows Option uchLength1 uchLength2 1 Length Value 0 2 Lengths High Value Low Value Range Min Value Max Value Any length 0 0 Default 6 uchLength1 and 55 uchLength2 5 14 Programmer s Manual Description uchCheckDigits The number of check digits to use with the bar codes Values are 0 One check digit 1 Two check digits For this value you must also set uchCh
124. while sharing the serial port 4 69 retrieving buffer contents with autotrigger 4 60 retrieving buffer contents without autotrigger 4 63 retrieving characters with echoing 4 50 retrieving characters without echoing 4 48 retrieving configuration 4 62 using 6 5 scanners 2 9 scnCloseScanner function 4 44 scnGetBarCodeType function 4 46 scnGetch function 4 48 scnGetche function 4 50 scnGetCodabarInfo function 4 52 scnGetCode128Info function 4 53 scnGetCode39Info function 4 54 scnGetCode93Info function 4 55 scnGetD2of5Info function 4 56 scnGetGenerallnfo function 4 57 scnGetl2of5 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 scnSetCodabarlinfo function 4 74 scnSetCode128Info function 4 76 scnSetCode39Info function 4 78 scnSetCode93Info function 4 80 scnSetD2of5Info function 4 82 scnSetGenerallnfo function 4 84 scnSetl2of5Info function 4 86 scnSetMSIInfo function 4 88 scnSetScaninfo function 4 90 senTrigger function 4 95 scnUPCEAN Info function 4 92 scrolling display up or down 4 107 SDK contents 1 3 libraries 3 4 setbaud command 7 16 setport command 7 16 settimeout command 7 17 setting active display page 4 112 cursor location 4 101 video mode 4 111 setting displa
125. y speed 2 3 software requirements 1 2 sounding the beeper 4 96 speaker 2 5 specifying supplies information 4 13 4 39 speed of display setting 2 3 spkBeep function 4 96 status of Print subsystem retrieving 4 42 Strings writing with attributes at current cursor location 4 102 supplies calibrating 4 13 4 18 retrieving information about 4 38 specifying information 4 39 specifying information about 4 13 sysGetBlOSVersion function 4 97 system requirements 1 2 Index 11 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 U ucd command 7 17 uclient 7 1 uclient commands 7 5 uclient userve troubleshooting 7 23 udel command 7 18 udir command 7 18 udiskfree command 7 19 umd command 7 20 UPC bar codes configuration data structure 5 16 retrieving configuration values 4 66 setting configuration values 4 92 UPCEANINFO data structure 5 16 upper case alpha mode activating 4 8 urd command 7 21 urun command 7 21 12 Index userve 7 1 using scanner 6 5 utilities LCD 2 3 REMDISK 3 4 REMSERV 3 4 uview command 7 22 uwd command 7 22 v vidBackLightOn function 4 99 video mode retrieving current 4 100 setting 4 111 vidGetState function 4 100 vidPutCursor function 4 101 vidPutStr function

Download Pdf Manuals

image

Related Search

Related Contents

SHARPY - Clay Paky  conditions generales de vente 140-150, avenue roger  Sartorius WDS 400  Ariens 921030 Snow Blower User Manual  Manuel d`utilisation de l`application de relevé d`occupation  取扱説明書  7205e User Manual  C-8050 - Fadisel  取扱説明書 (保管してお使い頂くタイプ)  Consignes relatives au mode d`emploi  

Copyright © All rights reserved.
Failed to retrieve file