Monarch 9400 Series manual Compressing the Data Stream

Page 64

9400 Series Programmer's Manual

Compressing the Data Stream

Image data usually consists of a large amount of repetitive data. Therefore, the printer uses a data compression algorithm for the graphic message structure. Here's how it works.

1.Any image is defined as a matrix of cells.

2.Each row of the matrix consists of a series of consecutive ON (black) or OFF (white) cells. The range is 1-26, represented by adding either a hex 40 (black) or hex 60 (white). Cells that print black will be represented by the upper case letters `A' through `Z' in the file sent to the printer. Cells that print white will be represented by the lowercase letters `a' through `z' in the file sent to the printer. Consecutive cells greater than 26 require multiple letters.

Example: 39 consecutive white cells would be represented by the letters `zm' (i.e. `z' produces 26 white cells followed by `m' or 13 more white cells).

3.Each row of the matrix is terminated by the command inter-record separator, split vertical bar ( p ). However, the last row of the matrix ends with the TERMINATOR command, closed brace (}).

4.In addition to compressing consecutive cells, repetitive lines of compressed row data can be combined. For example, if twelve rows have the same data (;zm), a number can be added at the beginning of the line to repeat the line (;12zm).

The following example shows how you can compress the "Letter A" data stream. The long version is on the left. The compressed version of the same data stream is on the right.

5-12

Image 64
Contents Programmers Manual Page Table of Contents Parallel Character Width in Dots for Index-1 Series Programmers Manual Introduction Series Programmers Manual Overview Series Programmers Manual Input Characteristics Communication RequirementsData Flow Control Setting Communication Values Series Programmers Manual Cable Interface Pin Description9400PC Creating Online Data Streams Transmitting Online Data StreamsMode LPT1=COM1 Print FORMAT1.DAT Data Transmission Errors Error NotificationIncorrect Data Errors Monetary Symbols Command Characters CommandsProgramming Conventions Format Data Field Contents Format Header RecordExample SyntaxSyntax Checklist Message Structures Text Field Record 9992032 OCR-A UPC HR1 UPC HR2 T05,I,0,230,30,1,1,0,0,B p FieldContents Bar Code Field Record9425 16 0.06 inches 9445 9465 9474 23 0.09 inches 9425UPC-A UPC-E Human readable characters One digit ∙ No human readable characters appear with this bar code Code CodabarAscii Code Function Line Field Column Direction Stop One or two digits for the line thickness Series Programmers Manual Example Batch Data Batch Header Record9999 On printers with a knifeOne to four digits for the supply repetition SOCKS12 Entering Print Data for Fields Message Structures Using Multiple Batches with One Format Using Previously Defined Print DataBatch Separators Stacker Type None 920 924/925 Data Stream Turn batch separator off Series Programmers Manual Using Graphics Defining Graphic Image DataRow Dot count Coding Chart Black Dots White DotsData Stream Must begin with the letter G to identify Lines and Dots exist to Example Syntax Checklist Placing the Image in a Format 9425 508 0 to 2 inches 9445 1016 0 to 4 inches 9465 9474 Following batch data stream prints the tag below Example Field Contents Clear Image BufferCompressing the Data Stream Long Version Compressed Version Series Programmers Manual Text Font Sizes 9425/9445/9465/9474 FontsParallel Characters Rotated CharactersCharacter Width in Dots 9420/9440 FontsParallel Character Width in Dots for the 9425, 9445, Serial Character Width in Dots forParallel Character Width in Dots for Parallel Character Width in Dots for 9420/9440 FontsSerial Character Width in Dots for 9420/9440 Fonts Bar CodesBar Code Densities Bar Code Densities 9425/9445/9474 Value Bar Code Density Char/inBar Code Densities 9420/9440 QuickBar Code Densities 9465, Parallel Print Bar Code Densities 9465, Serial Print Line Width Line Widths 9425/9445/9474 and 9420/9440Line Line Width AppearanceHorizontal Line Widths Vertical Line Widths Appearance InchesAscii Code Symbol Description Special CharactersCode 128 Function Codes Ascii Code Function Code9420/9440 Horizontal Print Location Offline Online Inches TommsQuick References Ascii Characters Printable Characters by Font English/Metric Conversion Tomm = Tenths of millimeters Series Programmers Manual Formats, Text and Bar Code Fields Sample Format Data StreamSample Batch Data Stream Sample TagLine Fields Graphic Images Sample Graphic Data StreamB3,1,1,1,1,0,1LETTER-A p T0LETTER a Graphic p Compressed Graphic Data Sample Compressed Graphic Data StreamSample Format Data Stream Appendix B Code 128 Information Bar Code Data =Bar code Data = 1234ABC5678DEF Bar Code WidthBar code Data = 12345678ABCDEF Appendix B Code 128 Information Density Numeric Alpha Data Numeric data Quiet Zone To select this Function CodesPress these keys Table A-1 Bar Code Character Sets NUL SOH STX Code B FNC4 Series Programmers Manual Page U.S.A Canada