Monarch® Pathfinder® Ultra® Platinum 6039™ Printer Microsoft ® Visual Studio ® .NET 2003 & 2005 ! Microsoft ® Visual Basic ® ! Microsoft ® Visual C# ® Microsoft®, Windows®, Visual Studio®, Visual Basic®, and Visual C#® are trademarks of Microsoft Corporation, Inc. TC6039NETPM Rev. AE 1/08 ©2007 Paxar Americas, Inc. a subsidiary of Avery Dennison Corp. 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. ©2007 Paxar Americas, Inc.
TA B L E O F C O N T E N T S Introduction ................................................................................................1-1 Audience ................................................................................................1-1 Using this Manual ....................................................................................1-1 System Requirements ..............................................................................1-2 Software Requirements ...............................
Printing Functions ...................................................................................... 3-1 Stock ..................................................................................................... 3-2 Calibrate............................................................................................. 3-2 nStockType ......................................................................................... 3-3 Battery.......................................................................
Scanning Functions .....................................................................................4-1 General Class .........................................................................................4-2 AimDuration.........................................................................................4-2 BdirRedundancy ...................................................................................4-3 GoodScanWav ...............................................................................
Control Class........................................................................................ 4-34 CommitChanges ................................................................................ 4-34 DataMode ......................................................................................... 4-35 EnableScanning................................................................................. 4-37 DisableAllCodes ................................................................................
1 INTRODUCTION The Monarch® Pathfinder® Ultra® Platinum 6039™ software development kit (SDK) helps developers write applications for the Monarch® Pathfinder® Ultra® Platinum 6039™ printer. This manual includes the library for developers using ♦ Microsoft® Visual Studio® .NET 2003 (for Compact Framework 1.0). ♦ Microsoft® Visual Studio® .NET 2005 (for Compact Framework 2.0). The .NET framework includes compilers for Microsoft Visual Basic and Microsoft Visual C#.
System Requirements Following are the hardware and software requirements: Software Requirements ♦ Windows® 2000 Professional Edition and Windows® 2000 Service Pack 3 or later; or Windows® XP Professional Edition and Windows® XP. Note: The Microsoft® Windows Vista™ operating system is not currently supported. ♦ Microsoft ActiveSync synchronization software. The ActiveSync software is available on the Microsoft Web site (Microsoft.com) by searching on ActiveSync. ♦ Microsoft® Visual Studio® .
SDK Contents The SDK is located in the directory you specified during installation. It is divided into several sub-directories, as described below.
About the Printer There are several printer features that you must understand before you write an application, such as the speaker, memory, display, and keyboard. Speaker Applications can make the printer’s speaker beep for different lengths of time and frequencies or play a .wav file. For example, you might use the speaker to bring an error to the operator’s attention or to indicate a good scan. Refer to the Microsoft® Visual Studio® .NET 2003 or 2005 documentation to use the speaker.
Keyboard The printer’s keyboard appears to the right. Refer to the Microsoft® Visual Studio® .NET 2003 or 2005 documentation to use the keyboard. Key(s) Description Enter Accepts data or a menu selection. Tab Tabs to the next tab stop or the next field. Pressing Fct + Tab backspaces a tab stop or returns to the previous field. Fct Performs an application-defined function when pressed with a single-digit number. Alpha Enters upper case or lower-case alphabetic mode.
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), and HR2 (6) CG Triumvirate Typeface Bold 9 pt. (10) EFF Swiss Bold (50) CG Triumvirate Typeface 6 pt. (11) CG Triumvirate Typeface Bold (Full Character Set) 6.5 pt. (1000) CG Triumvirate Typeface Bold (Full Character Set) 8 pt. (1001) CG Triumvirate Typeface Bold (Full Character Set) 10 pt.
D E V E L O P I N G A P P L I C AT I O N S 2 This chapter describes how to develop an application for the printer. You will need to: 1. Create MPCL packets for your labels and tags, if needed. 2. Write the application. 3. Build the application. 4. Transfer or copy the application to the printer. See “Transferring Files” for more information. Creating MPCL Packets An application prints labels by submitting MPCL packets to the printer. Refer to the 6039 Packet Reference Manual for more information.
VB.NET Sample Imports Ultra ' Platinum Library Dim fmtUPCA As String = "{F,1,A,R,E,200,200," & Chr(34) & "UPCA" _ & Chr(34) & "|" & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "Demo _ VB.NET" & Chr(34) & "|" & "B,1,12,F,25,28,1,4,100,7,L,0|}" Dim rPrint As New Print rPrint.ClearError() ' Instantiate Print class ' Clear any errors If (Not rPrint.IsBatteryOKToPrint) Then ' Check Battery MsgBox("Low Battery", MsgBoxStyle.OKOnly, "Battery Check") Else '--Print Format and then Batch Data rPrint.
C# Sample using Ultra; // Platinum Library string fmtUPCA = "{F,1,A,R,E,200,200,\"UPCA\"|" + "C,150,49,0,50,8,8,A,L,0,0,\"Demo C Sharp\",1|" + "B,1,12,F,25,28,1,4,100,7,L,0|}"; Ultra.Print rPrint = new Print(); rPrint.ClearError(); // Instantiate Print // class // Clear any errors if (!rPrint.IsBatteryOKToPrint) // Check Battery MessageBox.Show("Low Battery", "Battery Check"); else { //--Print Format and Batch Data rPrint.Text = fmtUPCA; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1| rPrint.
Writing Applications The SDK is designed to work with the Microsoft® Visual Studio® development system using the .NET 2003 and 2005 framework. This compiler can be downloaded free of charge from the Microsoft.com Web site. Note: To lock access to functions, such as the display, video, control panel, refer to your standard Microsoft Windows documentation.
Scanner Function Overview The scanner contains a buffer to hold the data from a scan. The application receives data from the system by one of two methods. The first method is by the standard keyboard input and second method is by a special Windows message. See Chapter 4, “Scanning Functions” for information about the two methods. Using the Scanner To use the scanner, the application must: 1. Include the code to instantiate the class. For example, using VB.NET: Dim MyScanner As New Ultra.Scan.
Transferring Files to the Printer To transfer files between the printer and a computer, you need to have Microsoft ActiveSync Synchronization Software installed on your computer. Download the ActiveSync synchronization software from the Microsoft.com Web site. Follow the download instructions on the site. To transfer data files to the printer: 1. Open the folder with your data files on your computer. 2. Turn on the printer and wait thirty seconds for the desktop to load.
Programming Notes ♦ Include the Ultra.dll import file in all your applications. Without it, you are not able to access any scanner or printing functions. For example, Imports Ultra Using Ultra; ‘ for VB.NET // for C# ♦ Test your application once you have loaded it into the printer. ♦ The libraries included in this SDK are designed to support Microsoft® Visual Basic® 2003 and 2005; therefore, some function names changed. Visual Basic and Visual Studio® 2005 are case insensitive.
2-8 Programmer’s Manual
3 PRINTING FUNCTIONS The SDK contains a library of functions you can call in your application. The functions are divided into two categories: Printing Interface and Scanning Interface. This chapter describes the printer management functions and data structures. See Chapter 4, “Scanning Functions” for scanning functions. The function and data structure names are casesensitive. Note: Refer to the Microsoft® Visual Studio® .NET 2003 or 2005 documentation to configure the keyboard, sound, and display.
Stock Calibrate Description Calibrates the supplies in the printer and gives the supply information to the Print subsystem. Operators can load supplies (as described in the Operator’s Handbook) 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, such as the trigger, to call this function.
nStockType Description Sets the supply type in the printer. public eSTOCK_TYPE nStockType Parameters STOCK_PAPER Paper STOCK_FAX Fax STOCK_SYNTHETIC Synthetic Return Values STOCK_PAPER Paper STOCK_FAX Fax STOCK_SYNTHETIC Synthetic Example C# using Ultra; { Ultra.Print rPrint = new Print(); // Instantiate class rPrint.nStockType = Ultra.Print.eSTOCK_TYPE.STOCK_PAPER; // Stock Type = Paper } Example VB.NET Imports Ultra Dim rPrint As New Print ' Instantiate class rPrint.nStockType = rPrint.
Battery IsBatteryOKToPrint Description Checks if the printer’s LiIon battery (located in the handle) is charged enough to allow printing. Check the battery level before any printing session. Use this function immediately prior to printing, but not during printing. If you use it during printing, the return value is not accurate. Syntax public bool IsBatteryOKToPrint Parameters None Return Values FALSE The battery level is too low to allow printing. TRUE The battery level is high enough to allow printing.
nBatteryLevel Description Retrieves the LiIon battery’s level. This battery is located in the printer’s handle. This returns a value between 1 and 100, the percentage of charge left in the battery. Check the battery 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 public int nBatteryLevel Parameters None Return Values 0 You must charge the battery.
Example VB.NET Imports Ultra Dim rPrint As New Print Dim nStat As String ' Instantiate class nStat = Convert.ToString(rPrint.nBatteryLevel) MsgBox("Battery at " + nStat + " %", MsgBoxStyle.
Printing Feed Description Feeds a label through the printer. Syntax public void Feed() Parameters None Return Values None Example C# using Ultra; { Ultra.Print rPrint = new Print(); rPrint.Feed(); } //Instantiate class // Feed a Label Example VB.NET Imports Ultra Dim rPrint As New Print rPrint.
File Description Writes MPCL packets to the Print subsystem. You can send more than one packet at a time in a file. 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 LastPrintStatus in a loop, waiting until the printer becomes free. Syntax public string File Parameters FileName to be sent for printing Return Values None Example C# using Ultra; string strScanData = "C39"; Ultra.
Example VB.NET Import Ultra Dim rPrint As New Print Dim strScanData As String = "C39" rPrint.File rPrint.Text rPrint.Text rPrint.Text = = = = ' Instantiate class "\Onboard Flash\C39Fmt.
Text Description Writes a string to the Print subsystem. MPCL packets can be sent as a string. After sending a completed MPCL Packet use the LastPrintStatus function to get a status of the MPCL Packet. Syntax public string Text Parameters String to be sent to print Return Values None Example C# using Ultra; string fmtC39 = "{F,1,A,R,E,200,200,\"C39\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "T,1,22,V,6,1,0,1,1,1,O,C,0,0|" + "B,2,20,V,23,2,4,12,100,8,C,0|}"; string strScanData = "C39"; Ultra.
Example VB.NET Import Ultra Dim fmtC39 As String = "{F,1,A,R,E,200,200," & Chr(34) & "C39" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039" & Chr(34) & "|" _ & "T,1,22,V,6,1,0,1,1,1,O,C,0,0|" _ & "B,2,20,V,23,2,4,12,100,8,C,0|}" Dim strScanData As String = "C39" Dim rPrint As New Print rPrint.Text rPrint.Text rPrint.Text rPrint.
LastPrintStatus Description Retrieves status of the last MPCL packet processed by the Print Engine. Syntax public int LastPrintStatus Parameters None Return Values 0 Successful. 703-793 A motion control error occurred. After the operator corrects the printer condition, the application must call ClearError to reset the Motion Control subsystem. Refer to the 6039 Packet Reference Manual for more information. Other non-zero Error has occurred.
Example VB.NET Import Ultra Dim rPrint As New Print Dim nStat As String ' Instantiate class nStat = Convert.ToString(rPrint.LastPrintStatus()) If (rPrint.LastPrintStatus <> 0) Then ' Print Status MsgBox(nStat, MsgBoxStyle.
TextDoubleByte Description Writes a string to the Print subsystem. MPCL packets can be sent as a string. After sending a completed MPCL Packet use the LastPrintStatus function to get a status of the MPCL Packet. Syntax public string TextDoubleByte Parameters String to be sent to print Return Values None Example C# using Ultra; Ultra.Print rPrint = new Print(); //Instantiate class rPrint.Text = "{F,4,A,R,E,200,200,\"Japan\"|"; rPrint.Text = "C,50,0,0,139,2,2,B,L,0,0,\""; rPrint.
Example VB.NET Import Ultra Dim rPrint As New Ultra.Print rPrint.Text = "{F,4,A,R,E,200,200,""Japan""|" rPrint.Text = "C,50,0,0,139,2,2,B,L,0,0,""" rPrint.TextDoubleByte = ChrW(&H82C6) & ChrW(&H82C6) & ChrW(&H82BD) & ChrW(&H82DE) rPrint.Text = """|}" rPrint.
Byte Description Writes a byte array to the Print subsystem. MPCL packets can be sent as a byte array. After sending a completed MPCL Packet use the LastPrintStatus function to get a status of the MPCL Packet.
Example VB.NET Import Ultra Dim fmtC39 As String = "{F,1,A,R,E,200,200," & Chr(34) & "C39" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039" & Chr(34) & "|" _ & "T,1,22,V,6,1,0,1,1,1,O,C,0,0|" _ & "B,2,20,V,23,2,4,12,100,8,C,0|}" Dim strScanData As String = "C39" Dim rPrint As New Print ' Instantiate class rPrint.Text = fmtC39 rPrint.Byte = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Byte = "1" & Chr(34) & strScanData & Chr(34) & "|" rPrint.
FileParse Description Writes MPCL packets to the Print subsystem. You can send more than one packet at a time in a file. 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 LastPrintStatus in a loop, waiting until the printer becomes free. This command is a different from the File command by reading the passed file and sending the packets one by one checking the status after each packet has been sent.
Sensors fBlackMark 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 public bool fBlackMark Parameters None Return Values TRUE The supplies are aligned on the black mark. FALSE The supplies are not aligned on the black mark, or the Print subsystem is busy or uninitialized. Example C# using Ultra; { bool blnBlackMark; Ultra.
Example VB.NET Imports Ultra Dim rPrint As New Print Dim blnOnDemand As Boolean ' Instantiate class blnOnDemand = rPrint.fOnDemand If (blnOnDemand) Then ' If True MsgBox("Blocked", MsgBoxStyle.Information, "OnDemand Sensor") Else ' If False MsgBox("Not Blocked", MsgBoxStyle.
fOnDemand Description Determines the On-demand sensor’s current state. This sensor is an option for the printer. Syntax Public bool OnDemand Parameters None Return Values TRUE The sensor is blocked. FALSE The sensor is not blocked. Example C# using Ultra; { bool blnOnDemand; Ultra.Print rPrint = new Print(); // Instantiate class blnOnDemand = rPrint.fOnDemand; // If true if (blnOnDemand) { MessageBox.Show("Blocked", "OnDemand Sensor", MessageBoxButtons.OK,MessageBoxIcon.
Example VB.NET Imports Ultra Dim rPrint As New Print Dim blnOnDemand As Boolean ' Instantiate class blnOnDemand = rPrint.fOnDemand If (blnOnDemand) Then ' If True MsgBox("Blocked", MsgBoxStyle.Information, "OnDemand Sensor") Else ' If False MsgBox("Not Blocked", MsgBoxStyle.
Misc ClearError Description Resets the Motion Control subsystem after an application receives a motion control error (703-793). The operator must correct the printer condition (a supply jam, for example) before the application calls this function. Syntax public void ClearError() Parameters None Return Values None Example C# using Ultra; { Ultra.Print rPrint = new Print(); rPrint.ClearError(); } //Instantiate class //Clear Error Example VB.NET Imports Ultra Dim rPrint As New Print rPrint.
LockCfgMenu Description Allows the application to control access to all configuration menus for the printer and scanner. Syntax public void LockCfgMenu(bool fLock) Parameters fLock TRUE to lock the menu. FALSE to release the lock on the menu. Return Values None Example C# using Ultra; { Ultra.Keypad rKeypad = new Keypad(); //Instantiate class rKeypad.LockCfgMenu(true); //Lock Config Menu } Example VB.NET Imports Ultra Dim rKeypad As New Keypad rKeypad.
nStatus Description Retrieves the Print subsystem’s status. After submitting a print job, the application should call GetStatus in a loop, waiting until the printer becomes free. Syntax public int nStatus(void) Parameters None Return Values 0 The Print subsystem is ready. 1 The Print subsystem is busy. 406 MPCL parser error. 412 Could not communicate with the print engine. 601 Batch packet error. 756 Out of supplies or other motion error. Load supplies.
Example C# using Ultra; { Ultra.Print rPrint = new Print(); //Instantiate class if (rPrint.nStatus > 1) // Check Status MessageBox.Show(rPrint.nStatus.ToString(), "Status", MessageBoxButtons.OK,MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } Example VB.NET Imports Ultra Dim rPrint As New Print Dim nStat As String ' Instantiate class nStat = Convert.ToString(rPrint.nStatus()) If (rPrint.nStatus > 1) Then ' Check Status MsgBox(nStat, MsgBoxStyle.
ShiftMode Description Allows the application to determine the current shift mode of the keypad and also to set the shift mode.
3-28 Programmer’s Manual
4 SCANNING FUNCTIONS The SDK contains a library of functions you can call in your application. The functions are divided into two categories: Printing Interface and Scanning Interface. This chapter describes the scanning functions and data structures. Refer to Chapter 3, “Printing Functions” for printing. The function and data structure names are casesensitive. Note: Refer to the Microsoft® Visual Studio® .NET 2003 or 2005 documentation to configure the keyboard, sound, and display.
General Class AimDuration Description Sets the AIM Duration, which is the duration of the aiming beam when the scanner is activated. Syntax public int AimDuration Parameters AimDuration 00 - 99 tenths of a second 0 disables. Default Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); //Instantiate Class GENERAL.AimDuration = 0; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
BdirRedundancy Description Enables Bi-Directional Redundancy, which specifies that good scans must occur in both directions (forward and reverse) for the scan to be complete. Syntax public bool BdirRedundancy Parameters BdirRedundancy TRUE FALSE Scans must occur in both directions Default Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); //Instantiate Class GENERAL.BdirRedundancy = false; Ultra.Scan.Control CONTROL = new Ultra.Scan.
GoodScanWav Description Sets the file for a Good Scan. This sound is heard whenever a bar code is successfully scanned. To have no sound, clear this field. Syntax public string GoodScanWav Parameters None Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate class GENERAL.GoodScanWav = "ding.wav"; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
LinearSecurity Description Sets the Linear Security, which is how many times to scan the same barcode to determine a successful read. Select a higher level for lower quality bar codes. Syntax public int LinearSecurity Parameters LinearSecurity 1 – 4 scans Default: 1 Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate class GENERAL. LinearSecurity = 1; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
NoReadWav Description Sets the file for a No Scan. This sound is heard whenever a bar code is unsuccessfully scanned. To have no sound, clear this field. Syntax public string NoReadWav Parameters None Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate class GENERAL.NoReadWav = "noscan.wav"; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
Preamble Description Sets the Preamble, which specifies the characters to preface returned data from scanning. The Preamble can be up to twenty user-defined characters. Syntax public string Preamble Parameters Preamble up to 20 characters Default: Empty Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate class GENERAL.Preamble = "["; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
Postamble Description Sets the Postamble, which is the data to be sent after each scanned barcode. The Postamble can be up to twenty user-defined characters. Syntax public string Postamble Parameters Postamble up to 20 characters Default: Empty Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate class GENERAL.Postamble = "]"; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
Timeout Description Sets the scan Timeout in tenths of seconds, which is the amount of time the scanner beam is on before turning off when the trigger is pressed. Syntax public int Timeout Parameters Timeout 5 – 99 tenths of a second Default: 30 Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate class GENERAL.Timeout = 30; (); // Timeout after 30 seconds Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
Bar Code Classes Codabar Description Sets the scanner configuration values for CODABAR bar code. Syntax public public public public public public bool Enable bool FixedLength int Length1 int Length2 bool CLSIEdit bool NOTISEdit Field Description Enable Enables/disables the ability to scan Codabar bar codes. Default: FALSE FixedLength If FixedLength is TRUE, lengths 1 and 2 are fixed; if FixedLength is FALSE, length 1 is the minimum and length 2 is the maximum.
Example C# using Ultra; Ultra.Scan.Codabar CODABAR = new Ultra.Scan.Codabar(); // Instantiate class CODABAR.Enable = true; // Enable Codabar Symbology CODABAR.CLSIEdit = true; // Enable CLSIEDit CODABAR.NOTISEdit = true; // Enable NOTISEdit CODABAR.FixedLength = false; // Variable Length Enabled CODABAR.Length1 = 2; // Variable Length1 = 2 CODABAR.Length2 = 55; // Variable Length2 = 55 Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); CONTROL.
Code128 Description Sets the scanner configuration values for CODE128 bar code. Syntax public bool Enable public bool UCCEAN128 public bool ISBT128 Field Description Enable Enables/disables the ability to scan Code 128 bar codes. Default: TRUE UCCEAN128 Enables/disables the ability to scan UCC/EAN-128 bar codes. Default: TRUE ISBT128 Enables/disables the ability to scan ISBT 128 bar codes.
Example C# using Ultra; Ultra.Scan.Code128 C128 = new Ultra.Scan.Code128(); // Instantiate class C128.Enable = true; // Enable Code 128 Symbology C128.ISBT128 = true; // Enable ISBT128 C128.UCCEAN128 = true; // Enable UCCEAN128 Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.CommitChanges(); //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim C128 As New Scan.Code128 Dim CONTROL As New Ultra.Scan.Control C128.Enable = True C128.
Code39 Description Sets the scanner configuration values for Code39 bar code. Syntax public public public public public public public public public public bool Enable; bool Trioptic; bool XlatetoCode32; bool Code32Prefix; bool FixedLength; int Length1; int Length2; bool VerifyCD; bool XmitCD; bool FullASCII; Field Description Enable Enables/disables the ability to scan Code 39 bar codes. Default: TRUE Trioptic Enables/disables the ability to scan Trioptic Code 39 bar codes.
Field Description XmitCD Enables/disables the ability to transmit check digits with the data. Default: FALSE FullASCII Enables/disables 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 Trioptic and FullASCII at the same time.
Example C# using Ultra; Ultra.Scan.Code39 C39 = new Ultra.Scan.Code39(); // Instantiate class C39.Enable = true; // Enable Code 39 Symbology C39.Trioptic = false; // Disable Trioptic C39.XlateToCode32 = false; // Disable Convert to Code 39 C39.FullASCII = false; // Disable Full Ascii C39.XmitCD = false; // Disable Transmit C/D C39.VerifyCD = false; // Disable Verify C/D C39.FixedLength = false; // Variable Length Enabled C39.Length1 = 2; // Variable Length1 = 2 C39.
Code93 Description Sets the scanner configuration values for CODE93 bar code. Syntax public public public public bool Enable; bool FixedLength; int Length1; int Length2; Field Description Enable Enables/disables the ability to scan Code 93 bar codes. Default: FALSE FixedLength If FixedLength is TRUE, lengths 1 and 2 are fixed; if FixedLength is FALSE, length 1 is the minimum and length 2 is the maximum.
Example C# using Ultra; Ultra.Scan.Code93 C93 = new Ultra.Scan.Code93(); // Instantiate class Code93.Enable = TRUE; // Enable Code93 Symbology Code93.FixedLength = FALSE; // Variable Length Enabled Code93.Length1 = 4; // Variable Lenght1 = 4 Code93.Length2 = 20; // Variable Lenght1 = 20 Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.CommitChanges(); //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim C93 As New Scan.
D2of5 Description Sets the scanner configuration values for D2of5 bar code. Syntax public public public public bool Enable; bool FixedLength; int Length1; int Length2; Field Description Enable Enables/disables the ability to scan D2of5 bar codes. Default: FALSE FixedLength If FixedLength is TRUE, lengths 1 and 2 are fixed; if FixedLength is FALSE, length 1 is the minimum and length 2 is the maximum.
Example C# using Ultra; Ultra.Scan.D2OF5 D2OF5 = new Ultra.Scan.D2OF5 (); // Instantiate class D2OF5.Enable = TRUE; // Enable D2OF5 Symbology D2OF5.FixedLength = FALSE; // Variable Length Enabled D2OF5.Length1 = 12; // Variable Lenght1 = 12 D2OF5.Length2 = 0; // Variable Lenght1 = 0 Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.CommitChanges(); //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim D2OF5 As New Scan.
I2of5 Description Sets the scanner configuration values for I2of5 bar code. Syntax public public public public public public public bool Enable; bool FixedLength; int Length1; int Length2; bool VerifyCD; bool XmitCD; bool XlatetoEAN13; Field Description Enable Enables/disables the ability to scan I2of5 bar codes. Default: TRUE FixedLength If FixedLength is TRUE, lengths 1 and 2 are fixed; if FixedLength is FALSE, length 1 is the minimum and length 2 is the maximum.
Return Values None Example C# using Ultra; Ultra.Scan.I2OF5 I2OF5 = new Ultra.Scan.I2OF5 (); // Instantiate class I2OF5.Enable = True; // Enable I2OF5 Symbology I2OF5.FixedLength = True; // Variable Length Enabled I2OF5.Length1 = 14; // Variable Lenght1 = 14 I2OF5.Length2 = 0; // Variable Lenght1 = 0 I2of5.VerifyCD = True; // Enable Verify C/D I2of5.XmitCD = True; // Enable Transmit C/D I2of5.XlatetoEAN13= False; // Disable Convert to EAN13 Ultra.Scan.Control CONTROL = new Ultra.Scan.
Example VB.NET Imports Ultra Dim I2OF5 As New Scan.I2OF5 Dim CONTROL As New Ultra.Scan.Control I2OF5.Enable = True; I2OF5.FixedLength = FALSE; I2OF5.Length1 = 14; I2OF5.Length2 = 0; I2of5.VerifyCD = True; I2of5.XmitCD = True; I2of5.XlatetoEAN13= False; ' ' ' ' ' ' ' ' Instantiate class ' Instantiate class Enable I2OF5 Symbology Variable Length Enabled Variable Lenght1 = 14 Variable Lenght1 = 0 Enable Verify C/D Enable Transmit C/D Disable Convert to EAN13 CONTROL.
MSI Description Sets the scanner configuration values for MSI bar code. Syntax public public public public public public public bool Enable; bool FixedLength; int Length1; int Length2; bool Use2CDs; bool XmitCD; bool UseMod10Mod11CDAlg; Field Description Enable Enables/disables the ability to scan MSI bar codes. Default: FALSE FixedLength If FixedLength is TRUE, lengths 1 and 2 are fixed; if FixedLength is FALSE, length 1 is the minimum and length 2 is the maximum.
Example C# using Ultra; Ultra.Scan.MSI MSI = new Ultra.Scan.MSI (); // Instantiate class MSI.Enable = True; // Enable MSI Symbology MSI.FixedLength = True; // Variable Length Enabled MSI.Length1 = 6; // Variable Lenght1 = 6 MSI.Length2 = 55; // Variable Lenght1 = 55 MSI.Use2CDs = False; // Disable two check digits MSI.XmitCD = False; // Disable Transmit C/D MSI.UseMod10Mod11CDAl= False; // Enable Mod10/Mod10 Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.
RSS Description Sets the scanner configuration values for RSS bar code. Syntax public public public public bool bool bool bool Enable14; EnableLimited; EnableExpanded; ConvertUPCEAN; Field Description Enable14 Enables/disables the ability to scan RSS bar codes. Default: FALSE EnableLimited Enables/disables the ability to scan RSS Limited bar codes. Default: FALSE EnableExpanded Enables/disables the ability to scan RSS Expanded bar codes.
Example C# using Ultra; Ultra.Scan.RSS RSS = new Ultra.Scan.RSS (); // Instantiate class RSS.Enable14 = False; // Disable RSS Symbology RSS.EnableLimited = FALSE; // Disable RSS Limited RSS.EnableExpanded = FALSE;// Disable RSS Expanded RSS.ConvertUPCEAN = FALSE; // Disable Converions to UPC/EAN Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.CommitChanges(); //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim RSS As New Scan.
UPCEAN Description Sets the scanner configuration values for UPC and EAN bar codes.
Field Description EnableUPCA Enables/disables the ability to scan UPCA bar codes. Default: TRUE EnableUPCE Enables/disables the ability to scan UPCE0 bar codes. Default: TRUE EnableUPCE1 Enables/disables the ability to scan UPCE1 bar codes. Default: FALSE EnableEAN8 Enables/disables the ability to scan EAN8 bar codes. Default: TRUE EnableEAN13 Enables/disables the ability to scan EAN13 bar codes. Default: TRUE EnableBklnd Enables/disables the ability to scan Bookland EAN bar codes.
Field Description XmitUPCAPre Specifies how to transmit UPCA Preamble characters. Values are: 1 = XUP_NONE Do not transmit. 2 = XUP_SYSCHAR Transmit system character. 3 = XUP_SYSCOUNT Transmit system character and country code. Default: XUP_SYSCHAR XmitUPCEPre Specifies how to transmit UPCE Preamble characters. Values are: 1 = XUP_NONE Do not transmit. 2 = XUP_SYSCHAR Transmit system character. 3 = XUP_SYSCOUNT Transmit system character and country code.
Field Description CouponCode Enables the ability to scan UPCA/EAN Coupon Code bar codes.
Example C# using Ultra; Ultra.Scan.UPC UPCEAN = new Ultra.Scan.UPCEAN (); // Instantiate class UPCEAN.EnableUPCA = TRUE; // Enable UPCA Symbology UPCEAN.EnableUPCE = FALSE; // Disable UPCA Symbology UPCEAN.EnableUPCE1 = FALSE; // Disable UPCE1 Symbology UPCEAN.EnableEAN8 = FALSE; // Disable EAN8 Symbology UPCEAN.EnableEAN13 = FALSE; // Disable EAN13 Symbology UPCEAN.EnableBklnd = FALSE; // Disable Bklnd Symbology UPCEAN.Supplement = Ultra.Scan.UPCEAN.eSUPLEMENTAL.
Example VB.NET Imports Ultra Dim UPC As New Scan.UPCEAN ' Instantiate class Dim CONTROL As New Ultra.Scan.Control ' Instantiate class UPCEAN.EnableUPCA = TRUE; ' Enable UPCA Symbology UPCEAN.EnableUPCE = FALSE; ' Disable UPCA Symbology UPCEAN.EnableUPCE1 = FALSE; ' Disable UPCE1 Symbology UPCEAN.EnableEAN8 = FALSE; ' Disable EAN8 Symbology UPCEAN.EnableEAN13 = FALSE; ' Disable EAN13 Symbology UPCEAN.EnableBklnd = FALSE; ' Disable Bklnd Symbology UPCEAN.Supplement = UPC.eSUPPLEMENTAL.
Control Class CommitChanges Description Retrieves the scanner configuration data from the application and saves the reconfigured settings to the scan engine. Syntax public void CommitChanges(); Parameters None Return Values None Example C# using Ultra; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.CommitChanges(); //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim CONTROL As New Ultra.Scan.Control ' Instantiate class CONTROL.
DataMode Description Retrieves the Data Receive Mode from the application and saves the reconfigured settings to the scan engine. Syntax public eDATAMODE DataMode; Parameters DataMode The supply type. Values are DRM_WMCHAR The application receives data by the keyboard buffer. Default DRM_SMSCANCHAR The application receives data by the scanner through a special message. Return Values None Example C# using Ultra; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class Scanner.
Example VB.NET Imports Ultra Dim Control As New Ultra.Scan.Control ' Instantiate class Control.DataMode = Control.eDATAMODE.DRM_SMSCANCHAR ' Data from the scanner CONTROL.
EnableScanning Description Allows the scanner to scan the defined bar codes. Syntax public void EnableScanning(); Parameters None Return Values None Example C# using Ultra; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.EnableScanning(); // Enable Scanning CONTROL.CommitChanges(); //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim CONTROL As New Ultra.Scan.Control ' Instantiate class CONTROL.
DisableAllCodes Description Disables all bar codes. This function will cause all barcodes to be disabled from being scanned. Use this function when you want to enable only a few selected codes. Syntax public void DisableAllCodes(); Parameters None Return Values None Example C# using Ultra; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.DisableAllCodes(); // Disable all bar codes // Enable needed bar codes here CONTROL.
DisableScanning Description Disables the scanner from scanning the defined bar codes. Syntax public void DisableScanning(); Parameters None Return Values None Example C# using Ultra; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.DisableScanning(); CONTROL.CommitChanges(); // Disable Scanning //--Save Changes to the Scanner // Configuration Example VB.NET Imports Ultra Dim CONTROL As New Ultra.Scan.Control ' Instantiate class CONTROL.
ScannerMode Description Retrieves the current scanner mode data containing the default values and saves the reconfigured settings to the scan engine. Syntax public eSCANMODE ScannerMode; Parameters None Return Values SOM_MOMENTARY The scanner is on when the trigger is pressed and goes off when the trigger is released. SOM_CONTINUOUS The scanner is always on. A good scan causes the scanner to reset and continue scanning.
Example VB.NET Imports Ultra Dim CONTROL As New Ultra.Scan.Control ' Instantiate class CONTROL.ScannerMode = CONTROL.eSCANMODE.SOM_COMPATIBLE ' Enable Compatibility with 6037 CONTROL.
SendScanStatus Description Enable Send Scan Status to return the data after any scan. This data precedes the bar code and includes the length of data and bar code type. Syntax public bool SendScanStatus Parameters SendScanStatus TRUE FALSE Enable Send Scan Status Default Return Values None Example C# using Ultra; Ultra.Scan.General GENERAL = new Ultra.Scan.General(); // Instantiate Class GENERAL.SendScanStatus = false; // Send Scan Status Ultra.Scan.Control CONTROL = new Ultra.Scan.
Trigger 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. Syntax public void Trigger(); Parameters None Return Values None Example C# using Ultra; Ultra.Scan.Control CONTROL = new Ultra.Scan.Control(); // Instantiate class CONTROL.Trigger(); CONTROL.CommitChanges(); // Start Scanning //--Save Changes to the Scanner // Configuration Example VB.
TriggerMode Description Sets the trigger mode configuration values the application set. Syntax public eTRIGGERMODE TriggerMode; Parameters TriggerMode The supply type. Values are TM_SCAN Pressing the trigger turns on the scanner. TM_DROP The printer ignores the trigger press and does not turn on the scanner. TM_FORWARD The printer passes the trigger press to the application as an F11, allowing more control of the application.
Example VB.NET Imports Ultra Dim CONTROL As New Ultra.Scan.Control ' Instantiate class CONTROL.TriggerMode = CONTROL.eTRIGGERMODE.TM_SCAN ' Enable scanning by trigger CONTROL.
SendScanStatus Codes If you have enabled SendScanStatus in your General structures definitions, use the following table to interpret the data returned from every scan. This data precedes the bar code and includes the length of data and bar code type. See “General” in this chapter for information about enabling SendScanStatus. See Appendix A, “Sample Applications” for information on receiving the scan status and extracting the length and barcode type.
S A M P L E A P P L I C AT I O N S A This chapter contains two sample applications written in both VB.NET and C#. The first application can be used as a demo. The second application shows how to use the scanning and printing functions. VB.NET Demo Sample '************************************************************ '* Name: 6039 Demo Application (Demo VB) * '* Version: 1.0.0 * '* Date: 5/1/2006 * '* Development * '* Environment: Microsoft Visual Studio .NET 2003 * ’* (Visual Basic.
#Region " Windows Form Designer generated code " Public Sub New() MyBase.New() ' This call is required by the Windows Form Designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) MyBase.
' Form1 Me.ClientSize = New System.Drawing.Size(242, 272) Me.Controls.Add(Me.btnClear) Me.Controls.Add(Me.btnEnter) Me.Controls.Add(Me.txtUPC) Me.Controls.Add(Me.lblScanEnterData) Me.Text = "Demo" End Sub Public Shared Sub Main() Application.Run(New Form1) End Sub #End Region '************************************************************ '* Form1_Load Event '* Description: '* Set App Name & Version '* Enable/Disable Barcode Symbologies & Commit Changes(save '* to ultra.
' Set ScannerMode (Scanner is on until T/O or successful ' scan) CONTROL.ScannerMode = CONTROL.eSCANMODE.SOM_COMPATIBLE ' Set DataMode (application receives data is by the WM_CHAR ' standard method.) CONTROL.DataMode = CONTROL.eDataMode.DRM_WMCHAR CONTROL.SendScanStatus = False ' Don't Send Scan Status Message CONTROL.
'************************************************************ '* txtUPC_KeyDown Event '* Description: '* Handle the KeyDown event to determine the '* type of character entered into the control. '* if Enter is Pressed, execute the btnEnter_Click Event '************************************************************ Private Sub txtUPC_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtUPC.KeyDown If (e.KeyCode.
' Check Battery MsgBox("Low Battery", MsgBoxStyle.OKOnly, "Battery Check") Else ' --Print Format and then Batch Data rPrint.Text = fmtUPCA rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & txtUPC.Text & Chr(34) & "|}" ' --Clear UPC and Set Focus txtUPC.Text = "" txtUPC.
C# Demo Sample //'********************************************************** //* Name: 6039 Demo Application (Demo CSharp) * //'* Version: 1.0.0 * //'* Date: 5/1/2006 * //'* Development * //'* Environment: Microsoft Visual Studio .NET 2003 * //'* (C Sharp.NET) * //'* Company: Paxar Americas, Inc * //'* Copyright 2006 * //'* Supply Size 2020 (2.0" x 2.
public Form1() { // Required for Windows Form Designer support InitializeComponent(); // TODO: Add any constructor code after InitializeComponent // call } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor.
// btnEnter this.btnEnter.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular); this.btnEnter.Location = new System.Drawing.Point(32, 126); this.btnEnter.Text = "Enter"; this.btnEnter.Click += new System.EventHandler(this.btnEnter_Click); // btnClear this.btnClear.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular); this.btnClear.Location = new System.Drawing.Point(128, 128); this.btnClear.Text = "Clear"; this.btnClear.Click += new System.
//*********************************************************** //* Form1_Load Event //* Description: //* Set App Name & Version //* Enable/Disable Barcode Symbologies & Commit Changes(save //* to ultra.cfg) //*********************************************************** private void Form1_Load(object sender, System.EventArgs e) { // ---Set Application Name & Version Info Ultra.Version rVersion = new Ultra.Version(); // Instantiate Version class rVersion.AppName = "Demo C Sharp"; // Application Name rVersion.
//*********************************************************** //* Enable UPCA Barcodes only //********************************************************** Ultra.Scan.UPCEAN UPC = new Ultra.Scan.UPCEAN(); // Instantiate UPCEAN class UPC.EnableUPCA = true; // Enable UPCA UPC.XmitUPCACD = true; // Xmit UPCA C/D UPC.XmitUPCAPre = Ultra.Scan.UPCEAN.eXMITUPCPREAMBLE.XUP_SYSCHAR; // Ignores UPCA + 2, UPCA +5, EAN8 + 2, EAN8 +5, EAN13 +2 & // EAN13 + 5 Symbologies UPC.Supplemental = Ultra.Scan.UPCEAN.eSUPPLEMENTAL.
//*********************************************************** //* btnEnter_Click Event //* Description: //* If length of data is 12 print label if not //* display error message //*********************************************************** private void btnEnter_Click(object sender, System.EventArgs e) { string fmtUPCA = "{F,1,A,R,E,200,200,\"UPCA\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"Demo C Sharp\",1|" + "B,1,12,F,25,28,1,4,100,7,L,0|}"; if (txtUPC.Text.Length != 12) // Make sure Length is 12 { MessageBox.
//*********************************************************** //* btnClear_Click Event //* Description: //* Erase data & //* Set focus back to txtUPC //*********************************************************** private void btnClear_Click(object sender, System.EventArgs e) { txtUPC.Text = ""; // Erase any data txtUPC.
VB.NET Scan/Print Sample '************************************************************ '* Project: Platinum Scan-N-Print Sample (VB.NET) * '* Version: 1.0.0 * '* Date: 5/1/2006 * '* Development * '* Environment: Microsoft Visual Studio .NET 2003 * '* Company: Paxar Americas, Inc * '* Copyright 2006 * '* Description: * '* Scan and Print Demo for the M6039 Ultra Platinum. * '* Files will be loaded into the \paxar folder on the * '* Platinum * '* Notes: Need to add References to: * '* Microsoft.WindowsCE.
Public Class Form1 Inherits System.Windows.Forms.Form Public WithEvents label3 As System.Windows.Forms.Label Public WithEvents txtScanLength As System.Windows.Forms.TextBox Public WithEvents txtScanType As System.Windows.Forms.TextBox Public WithEvents label2 As System.Windows.Forms.Label Public WithEvents label1 As System.Windows.Forms.Label Public WithEvents txtScanData As System.Windows.Forms.
'label3 Me.label3.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Bold) Me.label3.Location = New System.Drawing.Point(8, 136) Me.label3.Size = New System.Drawing.Size(56, 16) Me.label3.Text = "Length" ' txtScanLength Me.txtScanLength.Location = New System.Drawing.Point(8, 152) Me.txtScanLength.Size = New System.Drawing.Size(88, 22) Me.txtScanLength.Text = "" 'txtScanType Me.txtScanType.Location = New System.Drawing.Point(8, 96) Me.txtScanType.Size = New System.Drawing.
' Form1 Me.ClientSize = New System.Drawing.Size(242, 272) Me.Controls.Add(Me.lblStatus) Me.Controls.Add(Me.label3) Me.Controls.Add(Me.txtScanLength) Me.Controls.Add(Me.txtScanType) Me.Controls.Add(Me.label2) Me.Controls.Add(Me.label1) Me.Controls.Add(Me.txtScanData) Me.Text = "Scan & Print Sample" End Sub Public Shared Sub Main() Application.
' Set TriggerMode (Activate scanner on trigger press/release) Scanner.TriggerMode = Scanner.eTriggerMode.TM_SCAN ' --Enable Send Scan Status Scanner.SendScanStatus = True ' Enable Send Scan Status '************************************************************ '* UPCA Barcodes '************************************************************ Dim UPC As New Ultra.Scan.UPCEAN UPC.EnableUPCA = True ' Enable UPCA UPC.XmitUPCACD = True ' Xmit UPCA C/D UPC.XmitUPCAPre = UPC.XmitUPCAPre.
'************************************************************ '* Code 39 Barcodes '************************************************************ Dim C39 As New Ultra.Scan.Code39 C39.Enable = True ' Enable Code 39 C39.FullASCII = True ' Enable Full Ascii C39.XmitCD = True ' Xmit C/D C39.VerifyCD = False ' Don't Verify C/Ds C39.Trioptic = False ' Disable Triopic Code 39 C39.Code32Prefix = False ' No CODE32 prefix C39.XlateToCode32 = False ' Don't Convert to CODE32 C39.
'************************************************************ '* MSI Plessey Barcodes '************************************************************ Dim MSI As New Ultra.Scan.MSI MSI.Enable = True ' Enable MSI Barcodes MSI.Use2CDs = False ' Don't use 2 C/Ds MSI.UseMod10Mod11CDAlg = False ' Don't use Mod 10 MSI.XmitCD = True ' Xmit C/D MSI.FixedLength = False ' Variable Length Enabled MSI.Length1 = 1 ' Variable Length1 = 1 MSI.
' Save Changes to the Scanner Configuration which builds a ' new Ultra.cfg Scanner.CommitChanges() lblStatus.Text = "" ' Initialize Status Field txtScanData.Text = "" ' Initialize Barcode Data field txtScanType.Text = "" ' Initialize Barcode Type Field txtScanLength.Text = "" ' Initialize Barcode Length field txtScanData.Focus() ' Set focus to Scan Data field Cursor.Current = Cursors.Default ' Change Cursor Back to Default lblStatus.Text = "Ready" ' Inform user it is ready Me.
'************************************************************ '* WndProc '* Description '************************************************************ Protected Overrides Sub WndProc( _ ByRef msg As Microsoft.WindowsCE.Forms.Message) Dim nBarType As Integer = 0 If (msg.Msg = unScanMsgID) Then If (msg.WParam.ToInt32() = SM_SCANCHAR) Then objForm.txtScanData.Text += Convert.ToChar(msg.LParam.ToInt32()) count = count - 1 If (count = 0) Then strScanData = objForm.txtScanData.
Select Case nBarType Case -1 objForm.txtScanType.Text = "No Scan" objForm.txtScanLength.Text = "0" Case 0 objForm.txtScanType.Text = "Unknown" Case 1 objForm.txtScanType.Text = "Code 39" Case 2 objForm.txtScanType.Text = "Codabar" Case 3 objForm.txtScanType.Text = "Code 128" Case 4 objForm.txtScanType.Text = "Discrete 2 of 5" Case 5 objForm.txtScanType.Text = "IATA 2 of 5" Case 6 objForm.txtScanType.Text = "Interleaved 2 of 5" Case 7 objForm.txtScanType.Text = "Code 93" Case 8 objForm.txtScanType.
Case 72 objForm.txtScanType.Text Case 73 objForm.txtScanType.Text Case 74 objForm.txtScanType.Text Case 75 objForm.txtScanType.Text Case 80 objForm.txtScanType.Text Case 136 objForm.txtScanType.Text Case 137 objForm.txtScanType.Text Case 138 objForm.txtScanType.Text Case 139 objForm.txtScanType.Text Case 144 objForm.txtScanType.Text End Select = "UPC A + 2" = "UPC E + 2" = "EAN 8 + 2" = "EAN 13 + 2" = "UPC E1 + 2" = "UPC A + 5" = "UPC E + 5" = "EAN 8 + 5" = "EAN 13 + 5" = "UPC E1 + 5" objForm.txtScanData.
' Barcode Type Dim rPrint As New Ultra.
Const fmtUPCA As String = "{F,1,A,R,E,200,200," & Chr(34) & "UPCA" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039 Platinum" & Chr(34) & "|" _ & "B,1,12,F,25,28,1,4,100,7,L,0|" _ & "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}" Const fmtUPCA2 As String = "{F,1,A,R,E,200,200," & Chr(34) & "UPCA2" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039 Platinum" & Chr(34) & "|" _ & "B,1,14,F,25,38,10,2,100,7,L,0|" _ & "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}" Const fmtUPCA5 As String = "{F,1,A,R,
Const fmtEAN85 As String = "{F,1,A,R,E,200,200," & Chr(34) & "EAN85" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039 Platinum" & Chr(34) & "|" _ & "B,1,13,V,25,40,15,2,100,7,L,0|" _ & "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}" Const fmtEAN13 As String = "{F,1,A,R,E,200,200," & Chr(34) & "EAN13" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039 Platinum" & Chr(34) & "|" _ & "B,1,13,V,25,24,7,4,100,7,L,0|" _ & "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}" Const fmtEAN132 As String = "{F,1,A
Const fmtUPCE2 As String = "{F,1,A,R,E,200,200," & Chr(34) & "UPCE2" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039 Platinum" & Chr(34) & "|" _ & "B,1,9,V,25,35,12,4,100,7,L,0|" _ & "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}" Const fmtUPCE5 As String = "{F,1,A,R,E,200,200," & Chr(34) & "UPCE5" & Chr(34) & "|" _ & "C,150,49,0,50,8,8,A,L,0,0," & Chr(34) & "M6039 Platinum" & Chr(34) & "|" _ & "B,1,12,V,25,20,13,4,100,7,L,0|" _ & "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}" strType = objForm.txtScanType.
Case "Discrete 2 of 5" objForm.lblStatus.Text = "D2of5 not available to print" Case "IATA 2 of 5" objForm.lblStatus.Text = "IATA 2of5 not available to print" Case "Interleaved 2 of 5" rPrint.Text = fmtI2OF5 rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "3" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.Text = "" Case "Code 93" rPrint.Text = fmtC93 rPrint.
Case "EAN 13" rPrint.Text = fmtEAN13 rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.Text = "" Case "MSI Plessey" rPrint.Text = fmtMSI rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "3" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.
Case "UPC A + 2" rPrint.Text = fmtUPCA2 rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.Text = "" Case "UPC E + 2" rPrint.Text = fmtUPCE2 rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.Text = "" Case "EAN 8 + 2" rPrint.Text = fmtEAN82 rPrint.
Case "UPC E + 5" rPrint.Text = fmtUPCE5 rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.Text = "" Case "EAN 8 + 5" rPrint.Text = fmtEAN85 rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|" rPrint.Text = "1," & Chr(34) & strScanData & Chr(34) & "|" rPrint.Text = "2" & Chr(34) & strType & Chr(34) & "|}" objForm.lblStatus.Text = "" Case "EAN 13 + 5" rPrint.Text = fmtEAN135 rPrint.
C# Scan/Print Sample //'********************************************************** //'* Project: Platinum Scan-N-Print Sample (CSharp.NET) * //'* Version: 1.0.0 * //'* Date: 5/1/2006 * //'* Development * //'* Environment: Microsoft Visual Studio .NET 2003 * //'* (C Sharp.NET) * //'* Company: Paxar Americas, Inc * //'* Copyright 2006 * //'* Supply Size 2020 (2.0" x 2.0") * //'* Description: * //'* Scan and Print Demo for the M6039 Ultra Platinum.
{ /// /// Summary description for Form1. /// public class Form1 : System.Windows.Forms.Form { public System.Windows.Forms.Label lblLength; public System.Windows.Forms.TextBox txtScanLength; public System.Windows.Forms.TextBox txtScanType; public System.Windows.Forms.Label lblType; public System.Windows.Forms.Label lblScanBarcode; public System.Windows.Forms.TextBox txtScanData; public System.Windows.Forms.
/// /// /// /// #region Windows Form Designer generated code Required method for Designer support - do not modify the contents of this method with the code editor. private void InitializeComponent() { this.lblLength = new System.Windows.Forms.Label(); this.txtScanLength = new System.Windows.Forms.TextBox(); this.txtScanType = new System.Windows.Forms.TextBox(); this.lblType = new System.Windows.Forms.Label(); this.lblScanBarcode = new System.Windows.Forms.Label(); this.
// lblScanBarcode this.lblScanBarcode.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold); this.lblScanBarcode.Location = new System.Drawing.Point(8, 24); this.lblScanBarcode.Size = new System.Drawing.Size(100, 16); this.lblScanBarcode.Text = "Scan Barcode"; // txtScanData this.txtScanData.Location = new System.Drawing.Point(8, 40); this.txtScanData.Multiline = true; this.txtScanData.Size = new System.Drawing.Size(208, 20); this.txtScanData.Text = ""; // lblStatus this.lblStatus.
/// /// The main entry point for the application. /// static void Main() { Application.Run(new Form1()); } //*********************************************************** //* Form1_Load Event //* Description //* Form Load Event - Enable Barcode Symbologies //* Initialize Text Fields & Set Focus //*********************************************************** private void Form1_Load(object sender, System.EventArgs e) { // --Display Status to user lblStatus.Text = "Please Wait...
//************************************************************ //* UPCA Barcodes //************************************************************ Ultra.Scan.UPCEAN UPC = new Ultra.Scan.UPCEAN(); // Instantiate UPCEAN class UPC.EnableUPCA = true; // Enable UPCA UPC.XmitUPCACD = true; // Xmit UPCA C/D UPC.XmitUPCAPre = Ultra.Scan.UPCEAN.eXMITUPCPREAMBLE.XUP_SYSCHAR; // --To Scan/Print UPCE Barcodes, UPCE Preamble must be set to // NONE UPC.EnableUPCE = true; // Enable UPCE UPC.
C39.VerifyCD = false; // Don't Verify C/Ds C39.Trioptic = false; // Disable Triopic Code 39 C39.Code32Prefix = false; // No CODE32 prefix C39.XlateToCode32 = false; // Don't Convert to CODE32 C39.FixedLength = false; // Variable Length Enabled C39.Length1 = 2; // Variable Length1 = 2 C39.Length2 = 55; // Variable Length2 = 55 //************************************************************ //* Code 128 Barcodes //************************************************************ Ultra.Scan.Code128 C128 = new Ultra.
MSI.Length1 = 1; // Variable Length1 = 1 MSI.Length2 = 55; // Variable Length2 = 55 //************************************************************ //* Code 93 Barcodes //************************************************************ Ultra.Scan.Code93 C93 = new Ultra.Scan.Code93(); // Instantiate Code 93 class C93.Enable = true; // Enable Code 93 Symbology C93.FixedLength = false; // Variable Length Enabled C93.Length1 = 2; // Variable Length1 = 2 C93.
// // // // lblStatus.Text = ""; // Initialize Status Field txtScanData.Text = ""; Initialize Barcode Data field txtScanType.Text = ""; Initialize Barcode Type Field txtScanLength.Text = ""; Initialize Barcode Length field txtScanData.Focus(); // Set focus to Scan Data field Cursor.Current = Cursors.Default; Change Cursor Back to Default lblStatus.Text = "Ready"; // Inform user it is ready this.Refresh(); // Refresh the Screen } } // public class Form1 : System.Windows.Forms.
//************************************************************ //* MyMessageWindow //* Description //************************************************************ public MyMessageWindow(Form1 myForm) { objForm = myForm; unScanMsgID = (UInt32)RegisterWindowMessage(STR_SCANMSG); } //************************************************************ //* WndProc //* Description //************************************************************ protected override void WndProc(ref Microsoft.WindowsCE.Forms.
//--Barcode Type switch (nBarType) { case -1: objForm.txtScanType.Text = objForm.txtScanLength.Text break; case 0: objForm.txtScanType.Text = break; case 1: objForm.txtScanType.Text = break; case 2: objForm.txtScanType.Text = break; case 3: objForm.txtScanType.Text = break; case 4: objForm.txtScanType.Text = break; case 5: objForm.txtScanType.Text = break; case 6: objForm.txtScanType.Text = break; case 7: objForm.txtScanType.Text = break; case 8: objForm.txtScanType.Text = break; case 9: objForm.
case 15: objForm.txtScanType.Text break; case 16: objForm.txtScanType.Text break; case 21: objForm.txtScanType.Text break; case 22: objForm.txtScanType.Text break; case 23: objForm.txtScanType.Text break; case 48: objForm.txtScanType.Text break; case 49: objForm.txtScanType.Text break; case 50: objForm.txtScanType.Text break; case 72: objForm.txtScanType.Text break; case 73: objForm.txtScanType.Text break; case 74: objForm.txtScanType.Text break; case 75: objForm.txtScanType.Text break; case 80: objForm.
case 137: objForm.txtScanType.Text break; case 138: objForm.txtScanType.Text break; case 139: objForm.txtScanType.Text break; case 144: objForm.txtScanType.Text break; } //switch (nBarType) = "UPC E + 5"; = "EAN 8 + 5"; = "EAN 13 + 5"; = "UPC E1 + 5"; objForm.txtScanData.Text = ""; } // if (msg.WParam.ToInt32() == SM_SCANSTATUS) } // if (msg.Msg == unScanMsgID) // call the base class WndProc for default message handling base.WndProc(ref msg); } // protected override void WndProc(ref // Microsoft.
string fmtCodabar = "{F,1,A,R,E,200,200,\"CODABAR\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "T,1,22,V,6,1,0,1,1,1,O,C,0,0|" + "B,2,18,V,23,100,5,8,100,8,B,0|" + "T,3,22,V,133,1,0,1,1,1,O,C,0,0|}"; string fmtC128 = "{F,1,A,R,E,200,200,\"C128\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "T,1,22,V,6,1,0,1,1,1,O,C,0,0|" + "B,2,22,V,23,100,8,8,100,8,B,0|" + "T,3,22,V,133,1,0,1,1,1,O,C,0,0|}"; string fmtI2OF5 = "{F,1,A,R,E,200,200,\"I2OF5\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum
string fmtEAN8 = "{F,1,A,R,E,200,200,\"EAN8\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "B,1,8,V,25,42,6,4,100,7,L,0|" + "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}"; string fmtEAN82 = "{F,1,A,R,E,200,200,\"EAN82\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "B,1,10,V,25,25,14,4,100,7,L,0|" + "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}"; string fmtEAN85 = "{F,1,A,R,E,200,200,\"EAN85\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "B,1,13,V,25,40,15,2,100,7,L,0|" + "T,2,22,V,133,1,0,1,1,1,O,C,0,
string fmtUPCE2 = "{F,1,A,R,E,200,200,\"UPCE2\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "B,1,9,V,25,35,12,4,100,7,L,0|" + "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}"; string fmtUPCE5 = "{F,1,A,R,E,200,200,\"UPCE5\"|"+ "C,150,49,0,50,8,8,A,L,0,0,\"M6039 Platinum\",1|" + "B,1,12,V,25,20,13,4,100,7,L,0|" + "T,2,22,V,133,1,0,1,1,1,O,C,0,0|}"; Ultra.Print rPrint = new Print(); // Instantiate Print Class // --Get the Barcode Type strType = objForm.txtScanType.Text; // --Clear any errors rPrint.
case "Discrete 2 of 5": objForm.lblStatus.Text = "D2of5 not available to print"; break; case "IATA 2 of 5": objForm.lblStatus.Text = "IATA 2of5 not available to print"; break; case "Interleaved 2 of 5": rPrint.Text = fmtI2OF5; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|"; rPrint.Text = "1,\"" + strScanData + "\"|2,\"" + strScanData + "\"|3,\"" + strType + "\"|}"; objForm.lblStatus.Text = ""; break; case "Code 93": rPrint.Text = fmtC93; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|"; rPrint.
case "EAN 13": rPrint.Text = fmtEAN13; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|1,\"" + strScanData + "\"|2,\"" + strType + "\"|}"; objForm.lblStatus.Text = ""; break; case "MSI Plessey": rPrint.Text = fmtMSI; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|"; rPrint.Text = "1,\"" + strScanData + "\"|2,\"" + strScanData + "\"|3,\"" + strType + "\"|}"; objForm.lblStatus.Text = ""; break; case "EAN 128": rPrint.Text = fmtEAN128; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|"; rPrint.
case "Coupon Code": objForm.lblStatus.Text = "Coupon Code not available to print"; break; case "RSS-14": objForm.lblStatus.Text = "RSS-14 not available to print"; break; case "RSS-Limited": objForm.lblStatus.Text = "RSS-Limited not available to print"; break; case "RSS-Expanded": objForm.lblStatus.Text = "RSS-Expanded not available to print"; break; case "UPC A + 2": rPrint.Text = fmtUPCA2; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|1,\"" + strScanData + "\"|2,\"" + strType + "\"|}"; objForm.lblStatus.
case "UPC E1 + 2": objForm.lblStatus.Text = "UPC E1 + 2 not available to print"; break; case "UPC A + 5": rPrint.Text = fmtUPCA5; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|1,\"" + strScanData + "\"|2,\"" + strType + "\"|}"; objForm.lblStatus.Text = ""; break; case "UPC E + 5": rPrint.Text = fmtUPCE5; rPrint.Text = "{B,1,N,1|E,0,0,1,1,0,1|1,\"" + strScanData + "\"|2,\"" + strType + "\"|}"; objForm.lblStatus.Text = ""; break; case "EAN 8 + 5": rPrint.Text = fmtEAN85; rPrint.
INDEX A AimDuration function ......... 4-2 applications building ......................... 2-4 writing ........................... 2-4 B bar codes AimDuration ................... 4-2 BdirRedundancy ............. 4-3 Codabar ...................... 4-10 Code128 ...................... 4-12 Code39 ........................ 4-14 Code93 ........................ 4-17 D2of5 .......................... 4-19 GoodScanWav ............... 4-4 I2of5 ........................... 4-21 LinearSecurity ................
D D2of5 scanning ...................... 4-19 D2of5 bar codes retrieving configuration values ... 4-19 D2of5 function ................. 4-19 DataMode function ........... 4-35 DisableAllCodes function . 4-38 DisableScanning function . 4-39 disabling scans ............... 4-39 display .............................. 1-4 documentation, related....... 1-3 E EnableScanning function .. 4-37 enabling scans ................ 4-37 errors clearing for motion control3-23 F fBlackMark function .........
H hardware requirements ...... 1-2 I I2of5 scanning ...................... 4-21 I2of5 bar codes retrieving configuration values ... 4-21 I2of5 function .................. 4-21 import files ........................ 2-4 information about supplies, specifying ...................... 3-2 initiating trigger ............... 4-43 initiating triggers ............. 4-44 IsBatteryOkToPrint function 3-4 K keyboard........................... 1-5 L labels feeding ..........................
S scan, disabling ................ 4-39 scan, enabling ................. 4-37 scan, functions ................ 4-40 ScannerMode function ..... 4-40 scanners ........................... 1-4 scanning Codabar bar code configuration . 4-10 Code128 bar code configuration 4-12 Code39 bar code configuration 4-14 Code93 bar code configuration 4-17 D2of5 bar code configuration4-19 functions ........................