AMT Datasouth 600 manual Example of a Procedure defined in Paltm

Page 54

Example of a Procedure defined in PALTM

The following procedure is defined in Pal_Procs_and_Formats.txt and illustrates how PALTM commands may be combined in a procedure to create a completely new function or capability. The file Pal_Procs_and_Formats.txt must be copied to the printer prior to using any of these utilities. The following utility shows how PALTM operators are used to create a simple Box draw procedure. This Box procedure makes use of another procedure defined called inchtopts. This procedure takes measurements in inches and converts to points which is the native unit used by PALTM. The advantage of using a procedure like this to draw boxes is to simplify the use of the PALTM language. Instead of issuing 7 PALTM commands to draw a box, this single procedure may be called with 5 parameters (lower left corner x,y, upper right corner x,y, and line width).

%========================================================================

% Box draw procedure

 

 

 

 

 

% Usage:

botX(in.)

botY(in.)

topX(in.)

topY(in.)

lwidth(in.)

Box

% Example:

0.1

0.1

3.9

1.9

0.01

Box

%

 

 

 

 

 

 

%

(topX, topY)

 

 

 

 

%+--------*

%

%

%*--------+

%(botX, botY)

%

%========================================================================

/Box

{

/lwidth exch def /topY exch def /topX exch def /botY exch def /botX exch def

botX inchtopts botY inchtopts moveto botX inchtopts topY inchtopts lineto topX inchtopts topY inchtopts lineto topX inchtopts botY inchtopts lineto closepath

lwidth inchtopts setlinewidth stroke

} bind def

Example of calling a Procedure from a host application

The two lines preceded by % are comment lines ignored by the PALTM interpreter and don't actually need to be transmitted to the printer. The last line shows the actual call to the procedure named Box defined in Pal_Procs_and_Formats.txt. Note that floating point numbers must have a leading 0 for example 0.1 instead of .1. Also note while the example below uses many spaces between parameters, this is only for clarity and only a single whitespace character is actually needed i.e. 0.1 0.1 3.9 1.9 0.01 Box would also work.

%Box draw

%botX(in.) botY(in.) topX(in.) topY(in.) lwidth(in.) Box

0.1

0.1

3.9

1.9

0.01

Box

Fastmark 600 Series User's Guide

54

Image 54
Contents User’s Guide AMT Datasouth Corp Important Safety Instructions Other Notices Trademark Credits Conventions Table of Contents Windows Printer Driver Table of Figures Model and Serial Number LocationIntroduction Model Overview ModelsModel No Serial No Model Features Standard FeaturesPaltm Print and Program Overview Traditional PrintingLegacy Data Stream Interpretation Legacy Data stream InterpretationUnpacking and Inspection Shipped with PrinterInstallation and Configuration Finding a Location for the PrinterPrinter Parts and Features External Switches, Indicators and ConnectionsConnecting the Power Cord Power ConnectionConnecting the Printer to Your Host Communication CableLoading the Ribbon Thermal Transfer Media onlyRibbon Holder Notches and Ribbon Core Slots Supply Ribbon Installation Ribbon Take-Up Installation Print head Module Closed Media Roll Installation Loading MediaMedia Sensor and Guides Loading Media over Platen Roller Print head Module Closed Close the Top Media Cover Loading Media into the Peeler Label Removal for Peeler OptionFeeding into the Peeler Mechanism Peeler Option Loading Media into the Cutter Option Inserting Labels in the Cutter OptionCalibrating Media Sensors Calibration of the MediaPrinting the Configuration Label RTS & XONKeypad Operation LED DescriptionSpecial Power Up Key Function Power up key functionsOn Line Key Operation Feature Management Mode FeatureMan ProgramChanging Features Setup Feature and Value List Feature Name Value Range DescriptionPrint Darkness 12 +12 MM/DD/YYYY Paltm Print Language Introduction Smooth Scalable Fonts Supported Bar CodesPaltm Bar Code List and Samples Paltm Print and Program Label Tutorial Showpages Printing Text on a LabelPaltm Print and Program Coordinate System PAL Coordinate System72 68 moveto 144 68 lineto stroke Showpages Printing a LinePrinting a Box Rotate a Text Object 100 100 moveto BARCODE123 /Code39 barcode Showpages Printing a Bar CodeIntroduction to Paltm Advanced Topics Advanced OverviewPaltm Print and Program Language Features § LCDSample Demo Files File Name DescriptionExample of a Procedure defined in Paltm Example of calling a Procedure from a host applicationDemo Label showing use of Print Utility Procedures Example of How to Define Label Formats Usage Name Street CityState Zip5 Zip4 MailingLabelExample of calling Label Format from Host Application MailingLabelWindows 2000 Driver Installation Windows Printer DriverSelecting Printer Fonts Printing Bar Codes From Windows 2000 Applications Adjusting the Windows 2000 Driver Bar Codes Windows XP Driver Installation Selecting Printer Fonts Printing Bar Codes From Windows XP Applications Adjusting the Windows XP Driver Bar Codes Windows NT/9x Driver Installation Selecting Printer Fonts Printing Bar Codes From Windows NT/9x Applications Adjusting the Windows NT/9x Driver Bar Codes Fastmark 600 Series Users Guide Troubleshooting and Maintenance Printer Detected ErrorsPrinter Detected Errors Other User Detected Errors Fastmark 600 Series Users Guide PCB Fastmark 600 Series Users Guide Peel and Present Sensing Preventive Maintenance Cleaning the Thermal Print Head TPHCleaning the Platen Roller Cleaning the paper sensorCleaning the Paper Compartment Appendix a General Specifications Specification Fastmark 602 PAL Fastmark 603 PALAppendix B Interface Specifications Serial InterfaceParallel Centronics Interface Auto Interface SelectAppendix C Ascii Table Appendix D Self Test Print Sample Appendix E Hidden Setup Features Hidden Setup Feature and Value ListOff line Update Mode Appendix F Updating Printer FirmwareFastmark 600 Series Users Guide Boot Mode Feature and Value List