Oki X400 X400 Programming Command Manual

Oki X400 Manual

Oki X400 manual content summary:

  • Oki X400 | X400 Programming Command Manual - Page 1
    TABLE OF CONTENTS OKIPOS X400 Programming Guide Introduction 1 The Oki Data Programming Language 1 Selecting Protocol Control Codes 2 Using Basic 2 Printing with the Parallel Port 3 Printing with the RS232 Port 4 The Print Area 4 Rotated Fields 8 Command Default Settings 8 Printer
  • Oki X400 | X400 Programming Command Manual - Page 2
    Area Select 79 Status 80 Two-Dimensional Symbols 81 Maxicode 82 PDF 417 84 Configuration Commands 86 Backfeed Enable 87 Calibrate Sensor 88 Custom Protocol Command Codes Download 89 Label Tear-off 91 Print Test Label 92 Print Darkness Fine Adjustment 93 Set RS232 Parameters 94 Set Print
  • Oki X400 | X400 Programming Command Manual - Page 3
    X400 printer to produce labels with logos, bar codes, and alphanumeric data. The commands listed include all revisions of firmware. The following information is presented in this section: The SATO Programming Language Selecting Protocol } {data} Commands with this format tell the printer to perform a
  • Oki X400 | X400 Programming Command Manual - Page 4
    data." SELECTING PROTOCOL CONTROL CODES Protocol codes are special control characters that prepare the printer to receive instructions. For example, be sent from the host. The manual uses Standard Protocol Control Codes for all of the examples. The Protocol Control codes must be downloaded from
  • Oki X400 | X400 Programming Command Manual - Page 5
    commands. The examples given in this manual are printed on separate lines because they will not . Both of these examples use the Standard Protocol codes. Printing with the Parallel Port 5 REM the label and printed in the "WL" font. Instructs the printer to print one label. Tells the printer
  • Oki X400 | X400 Programming Command Manual - Page 6
    "E$" string as an character Opens the COM1 port for output and sets the parameters as 9600 baud, No parity, 8 Data bits, 1 Stop bit and instructs the port to ignore the CTS and DSR control signals. Sends an "A" command code to print port #1 opened by statement 20 above. Sends the
  • Oki X400 | X400 Programming Command Manual - Page 7
    3" label length 7" Print Area Normal Reference Point H1, V1 Your Label 2:1" Label Width 2:0" from Edge 4.1" Print Area Label Feed Direction The base reference point is always on the right edge of the print head as you face the front (label exit) of the printer. If you are using a label that
  • Oki X400 | X400 Programming Command Manual - Page 8
    Note: After the reference point is moved, you can no longer print on the 426 dot "margin" unless the reference point is reset. 2. Use the normal reference point from the print area and use the horizontal position for each field to properly locate it on the label. Calculate the distance (in dots)
  • Oki X400 | X400 Programming Command Manual - Page 9
    V=100 H=50 V=200 V=310 H=70 4.1" 2" Unshifted Print Area If you are using a two inch wide label, the entire image may not appear on your label. By adding the following Base Reference Point command to the second line of the data stream, the base reference point will be changed, causing the
  • Oki X400 | X400 Programming Command Manual - Page 10
    ROTATED FIELD The printers can rotate each print field in 90o increments using the Rotate command. There are two variations of this command. % - The field rotates, but the base reference point for the field remains the same. R - The field and the base reference point rotate. The following
  • Oki X400 | X400 Programming Command Manual - Page 11
    parameters that can be configured are: Sensor Calibration Protocol Codes Print Darkness Range Sensor Type RS232 Parameters Label software (see page 92) or by using the FEED button (see User's Guide). LABEL SENSING The OKIPOS X400 printers can use eye-mark (black bar), gap or notch label sensing.
  • Oki X400 | X400 Programming Command Manual - Page 12
    Transfer print mode must be specified with an CP command. These two commands are followed by an CA Calibrate command to instruct the printer to perform the calibration procedure. The resulting calibration values are stored in the printer and used until the unit is recalibrated. A separated
  • Oki X400 | X400 Programming Command Manual - Page 13
    1. Explain the different commands and provide examples of their usage. 2. To provide a detailed reference for programming. Each command begins on a separate page with its own heading. An uniform layout is used to help you find key information about each command. For each Command Code in this section
  • Oki X400 | X400 Programming Command Manual - Page 14
    Babbcccd BDabbcccd Dabbcccd a = Bar code Symbol 0 Codabar 1 Code 39 2 Interleaved 2 of 5 (I25) 3 UPC-A/EAN-13 4 EAN-8 5 Industrial 2 of 5 6 Matrix 2 of 5 A MSI C Code 93 E UPC-E F Bookland G Code 128 I UCC 128 bb = Number of dots (01-12) for narrow bar and narrow space ccc = Bar height in
  • Oki X400 | X400 Programming Command Manual - Page 15
    Input to Printer A H25V25B103100*CODE 39* H155V130XS*CODE 39* H25V200BD20210045676567 H75V310XM45676567 H25V375BD30215001234567890 H25V950BA03100123455 H95V1060XS12345 H25V1125
  • Oki X400 | X400 Programming Command Manual - Page 16
    Printer Output 14
  • Oki X400 | X400 Programming Command Manual - Page 17
    UCC-128 Without Incrementing A H100V200BI04150101234567000000001 Q2Z With Incrementing A H100V200F001+001BI04150101234567000000001 Q2Z 15
  • Oki X400 | X400 Programming Command Manual - Page 18
    bars and human readable text below the symbol. 2. The Code 128, UCC 128, MSI, and Code 93 bar code are not affected by the narrow to wide ratios. 3. Bar Code command. 4. See Appendix B for more specific instructions and detailed information regarding individual bar code symbols. 5. Because of
  • Oki X400 | X400 Programming Command Manual - Page 19
    Bar Codes, Expansion Command Structure BWaabbb aa = bbb = Expansion factor by which the width of all bars and spaces will be increased (01-12) Bar height by dot (004 - 999 dots) Example: BW02100 Placement: Immediately follows the BT command and precedes data to be encoded.
  • Oki X400 | X400 Programming Command Manual - Page 20
    Bar Codes, Variable Ratio Command Structure BTabbccddee a = bb = cc = dd = ee = Bar Code Symbol 0 Codabar 1 Code 39 2 Interleaved 2 of 5 5 Industrial 2 of 5 6 Matrix 2 of 5 Narrow space in dots (01-99) Wide space in dots (01-99) Narrow bar in dots (01-99) Wide bar in dot (01-99) Example: <
  • Oki X400 | X400 Programming Command Manual - Page 21
    Special Notes 1. This command must be immediately follow by the BW Bar Code Exp -ansion command. 2. You may use only one variable ratio bar code per label. 3. If the data specified in this command is incorrect, the command is ignored and the ratio used will be based on the previous setting. 19
  • Oki X400 | X400 Programming Command Manual - Page 22
    Base Reference Point Command Structure A3H-aaaaVbbbb - = This character is optional. When present, it specifies that the horizontal offset is the negative direction. If it is left out the offset direction is positive. aaaa = bbbb = Horizontal Print Offset (-832 to 0832) Vertical Print
  • Oki X400 | X400 Programming Command Manual - Page 23
    commands by an additional 150 dots. 4. For a more detailed example of the Base Reference Point command, see "Print Area" in this section. 5. The OKIPOS X400 printers will not "wrap" (i.e. If any part of a character or image extends beyond the last print dot position. It will disappear and not be
  • Oki X400 | X400 Programming Command Manual - Page 24
    Valid code ranges are 21H to 52H in Hex or "!" to "R" in Binary. (data) = Data to describe the character image either in Hex or Binary format. Example: T1H3F K1H903F See Appendix C for a more detailed explanation. Placement: The Store command is typically sent in its own data stream to
  • Oki X400 | X400 Programming Command Manual - Page 25
    Printer Output A H150V100L0505K1H903F H350V100L1010K1H903F Q1Z Special Notes 1. When printing the custom character using the K Recall command, the character is affected by the following commands: Character Expansion Character Pitch Line
  • Oki X400 | X400 Programming Command Manual - Page 26
    Character Expansion Command Structure Laabb aa = bb = Multiple to expand horizontally (01~12) Multiple to expand vertically (01~12) Example: L0304 Placement: Preceding the data to be expanded Default: L0101 Command Function To expand characters independently in both the horizontal
  • Oki X400 | X400 Programming Command Manual - Page 27
    Special Notes This command will expand the following fonts: 1. Fonts U, S, M XU, XS, XM, OA & OB and fonts WB, WL, XB, and XL. 2. This command will also affect the following commands: Character Pitch Characters, Custom-Designed 3. The Character Expansion value is in effect for the current print job
  • Oki X400 | X400 Programming Command Manual - Page 28
    Character, Fixed Spacing Command Structure PR Example: See above Placement: Preceding the data. Default: The default is Proportional Spacing for proportional fonts. Command Function To reset proportional spacing and place the printer to fixed spacing. Input to Printer A H100<
  • Oki X400 | X400 Programming Command Manual - Page 29
    Character Pitch Command Structure Paa aa = Number of dots between characters (00 ~ 99). Example: P03 Placement: Preceding the text to be printed Default: P02 Command Function To designate the amount of spacing (in dots) between characters. This command provides a means of
  • Oki X400 | X400 Programming Command Manual - Page 30
    Special Notes 1. This command is affected by the L Character Expansion command. The Character Pitch is actually the product of the current horizontal expansion multiple and the designed pitch value. Example: L0304 P03 Pitch = (03) x (03) = 9 dots 2. To avoid confusion, you may want
  • Oki X400 | X400 Programming Command Manual - Page 31
    Continuous Forms Printing Command Structure None The printer locates the end of adhesive label by sensing the backing between labels or through the use of an Eye-Mark (black rectangle on the reverse side of the backing). It locates the end of a tag from a notch, eye-mark, or a hole between tags.
  • Oki X400 | X400 Programming Command Manual - Page 32
    Character, Proportional Spacing Command Structure PS PR Sets to proportional spacing. Resets to fixed spacing. Example: See above Placement: Preceding the data to be proportionally spaced. Default: PS Command Function To specify the printing of proportional or fixed spacing for
  • Oki X400 | X400 Programming Command Manual - Page 33
    Clear Print Job(s) & Memory Command Structure *a a = Specifies the internal memory section to be cleared. T To clear the custom character memory. & To clear the form overlay memory. X To clear all internal memory. Example: *& Placement: This command should be sent to the printer as an
  • Oki X400 | X400 Programming Command Manual - Page 34
    Copy Image Area Command Structure WDHaaaaVbbbbXccccYdddd aaaa = bbbb = cccc = dddd = Horizontal position of the top left corner of the area to be copied 0001 to 832. Vertical position of the top left corner of the area to be copied 0001 to 1424. Horizontal length of the image area to be
  • Oki X400 | X400 Programming Command Manual - Page 35
    Special Notes 1. Use the Print Position command (V and H) to locate the new area for the duplicate image. 2. Position of the new target area must not be inside the original image. 3. If you use the Rotate command, V, H, X and Y axis will be reversed. 4. If the reference area of the target image
  • Oki X400 | X400 Programming Command Manual - Page 36
    Cutter Command Command Structure CKa a = Cutter control 0 Disables cutter. 1 Enables cutter. Example: CK1 Placement: Following the Q Print Quality command. Default: Cutter is disabled Command Function To control the cutting of labels when using a OKI cutter unit with the printer
  • Oki X400 | X400 Programming Command Manual - Page 37
    Peeler Command Command Structure CLa a = Peeler control 0 Disables Peeler. 1 Enables Peeler. Example: CL1 Placement: Following the Q Print Quality command. Default: Peeler is disabled Command Function To control the cutting of labels when using Peeler unit with the printer.
  • Oki X400 | X400 Programming Command Manual - Page 38
    Fonts U, S, M, OA, OB, XU, XS & XM Command Structure XU XS XM OA Font XU Font XS Font XM Font OA U S M OB Font U Font S Font M Font OB Example: See above Placement: Preceding the data to be printed. Default: None Command Function To print text images
  • Oki X400 | X400 Programming Command Manual - Page 39
    Printer Output Special Notes 1. Characters may be enlarged through the use of Character Expansion command (see page 24). 2. Character spacing may be altered through the use of the Character Pitch command (see page 27). The default is 2 dots between characters. It is recommended to use a spacing of 5
  • Oki X400 | X400 Programming Command Manual - Page 40
    Fonts WB, WL, XB & XL Command Structure WBa Font WB XBa Font XB WLa Font WL XLa Font XL a = Provided for compatibility with CL Printers. Can be either a 0 or 1. Example: WB1123456 Placement: Preceding the data to be printed. Default: None Command Function To print
  • Oki X400 | X400 Programming Command Manual - Page 41
    Special Notes 1. Characters may be enlarged through the use of Character Expansion command (see page 24). 2. Character spacing may be altered through the use of the Character Pitch command (see page 27). 3. A font must be defined for each field to be printed. There is no default font. 4. The
  • Oki X400 | X400 Programming Command Manual - Page 42
    Font, Vector Command Structure Specify Vector Font: $a,b,c,d Data Vector Font: $=(data) a = A Helvetica Bold (proportional spacing). B Helvetica Bold (fixed spacing). b = Font width (24~999 dots) c = Font height (24~999 dots) d = Font variation (0~9) as follows: 0 Standard 1 Standard
  • Oki X400 | X400 Programming Command Manual - Page 43
    Printer Output Special Notes 1. The Pitch command can be used with Vector fonts. 2. If the font size designation is out of the specified range, a default value of 50 is used. 3. The font width and height values include asenders, desenders and other space. 4. A font must be defined for each field to
  • Oki X400 | X400 Programming Command Manual - Page 44
    Form Feed Command Structure A(space)Z Example: See above Placement: Separate data stream sent to printer. Default: None Command Function To feed a blank tag or label, which is the equivalent of a "form feed". Input to Printer A(space) Z Printer Output Blank label or tag.
  • Oki X400 | X400 Programming Command Manual - Page 45
    Form Overlay, Recall Command Structure / Example: See above Placement: Must be preceded by all other data and placed just before the Print Quality command (Q). Default: None Command Function To recall the label image from the form overlay memory for printing. This command recalls a
  • Oki X400 | X400 Programming Command Manual - Page 46
    Form Overlay, Store Command Structure & Example: See above Placement: Must be preceded by all other data and placed just before the Stop command (Z). Default: None Command Function To store a label image in the volatile form overlay memory. Only one label image may be stored in this
  • Oki X400 | X400 Programming Command Manual - Page 47
    . Using a dotaddressable matrix, design the graphic image in 8 dot by 8 dot blocks, then send it in a binary format to the printer. Input to Printer A H100V100GH006006 FFFFFFFFFFFFFFFFFFFFFFFFC00000000003 C00000000003C000FFFFFFF3C00080000013 C00080000013C0009FFFFF13C00080000013
  • Oki X400 | X400 Programming Command Manual - Page 48
    is not affected by either of the Rotation commands. Therefore, always design and locate your graphic image to print in the appropriate orientation. 4. The binary format reduces the transmission time by 50%. 46
  • Oki X400 | X400 Programming Command Manual - Page 49
    : Anywhere within the job data stream. Default: None Command Function To allow the creation and printing of graphic images using a PCX file format. Input to Printer See Appendix C for a detailed example. A H100V150GP03800,(...data...) Q1Z Printer Output Special
  • Oki X400 | X400 Programming Command Manual - Page 50
    Structure J Example: See above Placement: Immediately following A. Default: None Command Function To print text in a line by line format on a label. By specifying this command, you automatically select Font S with a Character Expansion of 2x2. You also establish a base reference
  • Oki X400 | X400 Programming Command Manual - Page 51
    Lines and Boxes Command Structure Line: aa = b = cccc = FWaabcccc Width of horizontal line in dots (01 ~ 99). Line orientation H Horizontal line. V Vertical line. Length of line in dots. Box: aa = bb = cccc = dddd = FWaabbVccccHdddd Width of horizontal side in dots (01 ~ 99). Width of
  • Oki X400 | X400 Programming Command Manual - Page 52
    Print Darkness Command Structure #Ea a = Print darkness value a = 1,2,3,4 or 5 Example: #E2 Placement: Must be placed immediately after A and immediately before Z in its own separate data stream. Default: 2 Command Function To specify a new print darkness setting. This
  • Oki X400 | X400 Programming Command Manual - Page 53
    Print Length, Expanded Command Structure AX AR EX0 Sets the print length to 14"(356 mm) Resets the maximum print length to 7"(178 mm) Sets the print length to 50"(1270 mm) Example: See above Placement: Must follow the Start Code command and be in its separate data stream. Default
  • Oki X400 | X400 Programming Command Manual - Page 54
    Line Feed Command Structure Eaaa aaa = Number of dots (001 ~ 999) between the bottom of the characters on one line to the top of the characters on the next line. Example: E010 Placement: Preceding the text that will use the line feed function. Default: None Command Function To print
  • Oki X400 | X400 Programming Command Manual - Page 55
    4. Following this command with a character will allow you to print with auto line feed. The print position will be determined from the value specified and the H value set in the printer. If you specify several H values after this command, the print position will be determined by the H value
  • Oki X400 | X400 Programming Command Manual - Page 56
    Media Size Command Structure A1aaaabbbb aaaa = Vertical Media Size in dots (0 to Vmax). bbbb = Horizontal Media Size in dots (0 to Hmax). Example: A132000832 Placement: Separate data stream to the printer. Default: A136000832 Command Function To set the size of the media. Input
  • Oki X400 | X400 Programming Command Manual - Page 57
    Postnet Command Structure BPn...n n...n = 5 digits (Postnet-32 format) 6 digits (Postnet-37 format) 9 digits (Postnet-52 format) 11 digits (Postnet-62 format, Delivery Point format). Example: BP123456789 Placement: Immediately preceding the data stream to be encoded. Default: None
  • Oki X400 | X400 Programming Command Manual - Page 58
    Print Position Command Structure Horizontal Position Haaaa Vertical Position Vbbbb aaaa = Number of dots horizontally from the base reference point 1 to 832. bbbb = Number of dots vertically from the base reference point 1 to 8120. Example: H0020V0150 Placement:
  • Oki X400 | X400 Programming Command Manual - Page 59
    Special Notes 1. The print position of a field is affected by both the Rotate (R) and A3 commands. 2. If any part of an image is placed past maximum allowable dots across the label, that part of the image will be lost. 3. If you attempt to print where there is no paper, you may damage the
  • Oki X400 | X400 Programming Command Manual - Page 60
    Print Quantity Command Structure Qaaaaaa aaaaaa = Total number of labels to print (1 to 65535). Placement: Just preceding Z. This command must be present in every print job. Default: Q1 Command Function To specify the total number of labels to print for a given print job. Input to
  • Oki X400 | X400 Programming Command Manual - Page 61
    a unique print speed through software for a particular label. This allows flexibility in finding the best performance and quality for the particular label format, media, and ribbon. All subsequent labels will print at this speed unless the speed is changed with this command. Input to Printer
  • Oki X400 | X400 Programming Command Manual - Page 62
    Repeat Label Command Structure C Example: See above Placement: Must be placed immediately after A and immediately before Z in its own data stream. Default: None Command Function To print duplicate of the last label printed. Input to Printer Printer Output A C Z A
  • Oki X400 | X400 Programming Command Manual - Page 63
    Replace Data (Partial Edit) Command Structure 0 Example: See above Placement: Must follow A and precede all other print data. Default: None Command Function To replace a specified area of the previous label with new data. This command will cause the previous label to print along with
  • Oki X400 | X400 Programming Command Manual - Page 64
    Special Notes 1. Specify the exact same parameters for the image to be replaced as were specified in the original data stream, including rotation, expansion, pitch, etc.. This will ensure that the new data will exactly replace the old image. If the replacement data contains fewer characters than
  • Oki X400 | X400 Programming Command Manual - Page 65
    Reverse Image Command Structure (aaaa,bbbb aaaa = Horizontal length in dots of reverse image area 1 to 832. bbbb = Vertical height in dots of reverse image area 1 to 10150 Example: (100,50 Placement: This command must be preceded by all other data and be placed just before Q.
  • Oki X400 | X400 Programming Command Manual - Page 66
    3. If the Rotate commands are used with this command, the V and H parameters are reversed. 4. If the height and width to be reversed contain other than alphanumeric data, the area is not printed. 5. If the values specified exceed the maximum ranges, the reverse image is not created. 64
  • Oki X400 | X400 Programming Command Manual - Page 67
    Rotate, Fixed Base Reference Point Command Structure %a a =0 1 2 3 Sets print to normal direction. Sets print to 90o CCW. Sets print to 180o CCW (upside down). Sets print to 270o CCW. Example: %3 Placement: Preceding any printed data to be rotated. Default: %0 Command Function
  • Oki X400 | X400 Programming Command Manual - Page 68
    Special Notes 1. Do not combine this command and the R rotate command in the same data stream. 2. The specified values are valid until another Rotate (%) command is received. 3. Receipt of a Stop Print (Z) command will reset the setting to the default value. 66
  • Oki X400 | X400 Programming Command Manual - Page 69
    Rotate, Moving Base Reference Point Command Structure Normal Direction: Rotated Direction: N R Example: See above Placement: Preceding any printed data to be rotated. Default: N Command Function The R command rotates the printing data of all subsequent images in a print job
  • Oki X400 | X400 Programming Command Manual - Page 70
    Special Notes 1. This command is provided for compatibility with other OKI printers. It is not recommended for new label designs and the % rotate command should be used. 2. Do not combine this command and the % rotate command (see page 65) in the same data stream. 3. A custom graphic is
  • Oki X400 | X400 Programming Command Manual - Page 71
    Sequential Numbering Command Structure Faaaabcccc,dd,ee aaaa = Number of times to repeat the same data (0001 ~ 9999). b = Plus or minus symbol (+ for increments, - for decrements). cccc = Value of step for sequence (0001 ~ 9999). dd = Number of digits for sequential numbering (01 ~ 99). The
  • Oki X400 | X400 Programming Command Manual - Page 72
    Printer Output Special Notes 1. The value specified for Print Quantity (see page 58) should be equal to the number of different sequential number desired multiplied by the number of repeats specified. Example: To print 2 sets each of the numbers 1001 ~ 1025 on separate labels, we need 50 total
  • Oki X400 | X400 Programming Command Manual - Page 73
    Start/Stop Label Command Structure Start Command: Stop Command: A Z Example: See above Placement: A must precede data. Z must follow data. Default: None. Command Function For all print jobs, the Start command must precede the data, and the Stop command must follow. The
  • Oki X400 | X400 Programming Command Manual - Page 74
    Expanded Memory Option Commands These commands require the Expanded Memory Option. There are two types of Expanded Memory cards, 2MB and 4MB respectively. 72
  • Oki X400 | X400 Programming Command Manual - Page 75
    CC1GIH002002001 0100038007C00FE01FF03FF87FFCFFFE07C007C007C007C007C007C007C 007C0 Z Q2Z Note: See Appendix C for detailed explanation on how to format a graphics data stream. Printer Output There is no printer output as a result of this command. See GR Recall Custom
  • Oki X400 | X400 Programming Command Manual - Page 76
    2. The maximum storage capacity is 999 graphics, up to the capacity of the memory expansion. 3. Each graphic to be stored must be sent in its own data stream. Example of correct data stream: A GIHaaabbb001(DATA) Z A GIHaaabbb002(DATA) Z Example of incorrect data stream:
  • Oki X400 | X400 Programming Command Manual - Page 77
    stored cannot be rotated before it is stored. It can be rotated when it is recalled. 2. Graphic image cannot be stored as part of a label format. 3. See the GI Custom Graphic Store command. 75
  • Oki X400 | X400 Programming Command Manual - Page 78
    command. Special Notes 1. This command requires Expanded Memory option. Call your Oki Data representative for details. 2. Graphics cannot be stored as part of a format. 3. Only black and white PCX files can be stored. 4. The file size specified by this command is the DOS file size in bytes. 76
  • Oki X400 | X400 Programming Command Manual - Page 79
    within its own data stream specifying the placement of the graphic. Default: None. Command Function To recall for printing a graphic file previously stored in a PCX format in the memory card. Input to Printer A CC1 H1V100PY011 %1H176V330PY011
  • Oki X400 | X400 Programming Command Manual - Page 80
    Expanded Memory Function Initialize Command Structure BJFaaaaaaaa aaaaaaaa = Eight character alphanumeric user ID. Example: BJFOKI Placement: Immediately following the CC Memory Area Select command. Default: None. Command Function This clears all of the data from the specified
  • Oki X400 | X400 Programming Command Manual - Page 81
    requires the Expanded Memory option. Call your local Oki Data representative for more information. 2. The OKIPOS X400 provides only one slot for the Expanded Memory option. 3. For the OKIPOS X400 printer, CC1 stands for onboard 512K byte flash memory and CC2 for the Optional flash memory (2M
  • Oki X400 | X400 Programming Command Manual - Page 82
    Expanded Memory Function Status Command Structure BJS Example: BJS Placement: After the CC Memory Area Select command. Default: None Command Function Causes the printer to print the card status. Input to Printer A CC2 BJS Z Printer Output MYCARD : 2097152
  • Oki X400 | X400 Programming Command Manual - Page 83
    Two-Dimensional Symbols The following commands are used to create the two-dimensional symbologies supported by the printers. 81
  • Oki X400 | X400 Programming Command Manual - Page 84
    , when used in a structured append format 1~8. b = Total number of Maxicode symbols in the set, when used in a structured format 1~8. c = 2 For Mode 2 Not currently supported. 7 Reader programming. dd...dd 9 digit numeric Postal Code. eee = 3 digit numeric Country Code. fff = 3 digit Service Class.
  • Oki X400 | X400 Programming Command Manual - Page 85
    "Guide to Bar Coding with UPS Online Version 5" for the UPS secondary message data format requirements and the latest format requirements. 2. This command implements Maxicode AIM I.S.S. (UPS version 3.1) symbol. 3. The following modes are supported. MODE 2 3 4 6 POSTAL CODE COUNTRY CODE SERVICE
  • Oki X400 | X400 Programming Command Manual - Page 86
    Two-Dimensional Bar Codes PDF 417 Command Structure BKaabbcddeeffffnn...n aa = Minimum module dimension (03~09 dots). Will not print if values of 01, 02 or greater than 10 are specified. bb = Minimum module pitch dimension (04 ~ 24 dots). Will not print if values of 01, 02, 03 or greater than
  • Oki X400 | X400 Programming Command Manual - Page 87
    Feed command cannot be used with this command. 8. The Macro and Truncated PDF417 symbols are not supported. 9. The values 00H through 1FH can be specified as print data. 10. This command can be stored in a format. 11. The R Rotate command can be used. 12. The print height of the symbol will
  • Oki X400 | X400 Programming Command Manual - Page 88
    CONFIGURATION COMMANDS The following commands are used to set the operating parameters of the OKIPOS X400 printers. The settings currently active in the printer can be determined by printing a Test Label, either by using the CT Print Test Label command
  • Oki X400 | X400 Programming Command Manual - Page 89
    Backfeed Enable Command Structure CEa a =0 1 Disables Backfeed. Enables Backfeed. Example: CE1 Placement: This command should be sent in a separate data stream. Default: Last setting. Command Function To select the top-of-label sensing method. Input to Printer Printer Output A
  • Oki X400 | X400 Programming Command Manual - Page 90
    or transmissive). 2. The sensor must be recalibrated whenever the sensor type is changed or incorrect label detection occurs. 3 When calibrating the sensor for the OKIPOS X400 Thermal Transfer unit operating in the thermal transfer mode, the ribbon must be installed in the printer. 88
  • Oki X400 | X400 Programming Command Manual - Page 91
    character for NULL in ASCII or hex format g = Replacement character for OFFLINE in ASCII or hex format Example: LD 0,0 Placement: Immediately following the A Start command and in an Independent data stream. Default: Standard Protocol command Codes Command Function Allows the user
  • Oki X400 | X400 Programming Command Manual - Page 92
    commas. 4. If two characters are specified for a parameter, it will be interpreted as a hex value. For example: Command Parameter 2B + Resulting Command Code + + 5. The current protocol command codes may be verified by printing a self test label (CT) 90
  • Oki X400 | X400 Programming Command Manual - Page 93
    Label Tear-Off Command Structure CBabb a = bb = + to move the print line down from the top edge of the label - to move the print line toward the top of the label. Distance moved in millimeters (00 to 25) Example: CB+03 Placement: This command should be sent in a separate data stream.
  • Oki X400 | X400 Programming Command Manual - Page 94
    this command. Command Function To print a test label. Input to Printer Printer Output A CT Z Special Note This mode is used for diagnostic troubleshooting and lists the current status of the printer configuration. 92
  • Oki X400 | X400 Programming Command Manual - Page 95
    command. Special Notes 1. This command covers the complete range of heat settings. 2. In general the Media Adjust Setting is ignored by the OKIPOS X400. 3. The factory setting for these adjustments is set to provide the optimum results when using the Oki Data supplied media with the printer. It
  • Oki X400 | X400 Programming Command Manual - Page 96
    Set RS232 Parameters Command Structure CRaaaaa,b,c,d aaaaa = Baud rate (9600, 19200 or 38400) b = Parity (N for None, O for Odd, E for Even) c = Number of data bits (7 or 8) d = Number of stop bits (1 or 2) Example: CR9600,N,8,1 Placement: Must be sent in a separate data stream.
  • Oki X400 | X400 Programming Command Manual - Page 97
    Thermal Transfer Printing (with ribbon) Example: CP0 Placement: Must precede all other commands in the data stream. Default: 1 for OKIPOS X400 model. Command Function To optimize the print head heat management algorithms. Input to Printer A CP0 Z Printer Output There is
  • Oki X400 | X400 Programming Command Manual - Page 98
    Set Sensor Type Command Structure CIa a =0 1 2 Disables Sensor. Reflective (Eye-Mark) Sensing. Transmissive (Label Gap or Notch) Sensing. Example: CI0 Placement: This command should be sent in a separate data stream. Default: CI2 (Transmissive Sensing) Command Function To select
  • Oki X400 | X400 Programming Command Manual - Page 99
    APPENDIX A. COMMAND CODE QUICK REFERENCE INSTRUCTION A DESCRIPTION Start code. Begins all print jobs. PAGE Page 71 A1aaaabbbb a = 0 Codabar 1 Code 39 2 Interleaved 2 of 5 (I25) 3 UPC-A/EAN-13 4 EAN-8 5 Industrial 2 of 5 6 Matrix 2 of 5 A MSI C Code 93 E UPC-E F Bookland G Code 128 Page 12 97
  • Oki X400 | X400 Programming Command Manual - Page 100
    width bar codes. For values a, bb, ccc and d see instructions for Babbcccd. Expansion Memory Function. Initializes the expansion memory in order digits (Postnet-32 format) 6 digits (Postnet-37 format) 9 digits (Postnet-52 format) 11 digits (Postnet-62 format, Delivery Point format). Page 55 98
  • Oki X400 | X400 Programming Command Manual - Page 101
    , when used in a structured append format 1~8. b = Total number of Maxicode symbols in the set, when used in a structured format 1~8. c = 2 For Mode 2 currently supported. 8 Reader programming. dd...dd 9 digit numeric Postal Code. eee = 3 digit numeric Country Code. fff = 3 digit Service
  • Oki X400 | X400 Programming Command Manual - Page 102
    CA CBabb CCa CDaaa,bbb CEa CIa CKa CLa CPa Calibration. Calibrates the media so that the print can recognize the characteristics of the media used. Page 88 Label Tear-Off. Page 91 a = + to move the print line down from the top edge of the label - to move the print line toward the top of the
  • Oki X400 | X400 Programming Command Manual - Page 103
    Codes. Prints 1:2 ration bar code. For UPC and EAN bar codes, Page 12 this will add descender bars. For values a, bb, ccc and d see instruction for Babbcccd. Eaaa Line Feed. Provides the ability to print multiple lines of the same Page 52 character size without specifying a new print position for
  • Oki X400 | X400 Programming Command Manual - Page 104
    Box. Prints a box. For values aa, bbbb, cc and dddd, see instructions for horizontal and vertical lines. Units of measurement are dots. aa = Width of 45 using a dot-addressable matrix. a = Specifies format of data stream to follow B binary format. H Hexadecimal format. bbb = Number of
  • Oki X400 | X400 Programming Command Manual - Page 105
    GPaaaaa,(data) PCX Graphics. Prints a graphic with standard PCX format. aaaaa = Number of bytes to be downloaded. Page 47 Binary. (data)= Data to describe the character image either in Hex or Binary format. Laabb Character Expansion. Expands character in both directions. aa = Multiple to expand
  • Oki X400 | X400 Programming Command Manual - Page 106
    M Font Type. Specifies the 13Wx20H dot matrix font (including Page 36 descenders). N Normal Direction. Returns to the original base reference point and Page 67 returns printing to the normal orientation. OA Font Type. Specifies the OCR-A font with dot matrix. Page 36 OA Font Matrix:
  • Oki X400 | X400 Programming Command Manual - Page 107
    ranges are 21H to 52H in Hex or "!" to "R" in Binary. (data)= Data to describe the character image either in Hex or Binary format. U Font Type. Specifies the 5Wx9H dot matrix font (including Page 36 descenders). Vbbbb Vertical Position. Specifies a field's vertical location down the Page
  • Oki X400 | X400 Programming Command Manual - Page 108
    WLa XBa XLa XM XS XU Z %a #Ea $a,b,c,d dddd = 0001 to 832. Vertical length of the image area to be copied 0001 to 1424. Font Type. Specifies the 28Wx52H dot matrix font (including descenders). Font Type. Specifies the 48Wx48H dot matrix font (including descenders). Font Type. Specifies the
  • Oki X400 | X400 Programming Command Manual - Page 109
    $=(data) (aaaa,bbbb & / 0 *a d = Font variation (0~9) as follows: 0 Standard 1 Standard open (outlined) 2 Gray (mesh) pattern 1 3 Gray (mesh) pattern 2 4 Gray (mesh) pattern 3 5 Standard open, shadow 1 6 Standard open, shadow 2 7 Standard mirror image 8 Italic 9 Italic open, shadow Data for Vector
  • Oki X400 | X400 Programming Command Manual - Page 110
    APPENDIX B. BAR CODE SPECIFICATION BAR CODE SYMBOLOGIES This section contains detailed information on the printing of bar codes on the OKIPOS X400 printers. Information on printing the following bar code symbologies is provided: Codabar Code 39 Interleaved 2 of 5 UPC-A/EAN-13 EAN-8 Industrial 2 of 5
  • Oki X400 | X400 Programming Command Manual - Page 111
    Codabar Command Structure 1:3 ratio 2:5 ratio 1:2 ratio B0bbcccd (data) d BD0bbcccd (data) d D0bbcccd (data) d bb = ccc = d = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Required Start and Stop character (A,B,C, or D) Bar code data (alphanumeric)
  • Oki X400 | X400 Programming Command Manual - Page 112
    Code 39 Command Structure 1:3 ratio 2:5 ratio 1:2 ratio B1bbccc* (data) * BD1bbccc* (data) * D1bbccc* (data) * bb = ccc = * = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Required Start and Stop character (asterisk) Bar code data (alphanumeric)
  • Oki X400 | X400 Programming Command Manual - Page 113
    Interleaved Two of Five Command Structure 1:3 ratio 2:5 ratio 1:2 ratio B2bbccc (data) BD2bbccc (data) D2bbccc (data) bb = ccc = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Bar code data (numeric); must be an even number of digits or else the
  • Oki X400 | X400 Programming Command Manual - Page 114
    10.0 75% 03 15.0 112% 04 20.0 150% Example H100V100BD30212001234567890 Notes D3 provides guide bars that extend longer than the reset of the bar code. BD3 Provides guide bars and the human readable text below the symbol. Calculating the Mod If you wish to encode the UPC
  • Oki X400 | X400 Programming Command Manual - Page 115
    1. First add all the numbers in the ODD positions. i.e., 0+2+4+6+8+0 = 20 2. Multiple the result of step 1 by 3. i.e., 20 x 3 = 60 3. Add up all the numbers in the EVEN positions. i.e., 1+3+5+7+9 = 25 4. Add the result of step 2 to that of step 3. i.e., 60 + 25 = 85 5. Subtract the result of step 4
  • Oki X400 | X400 Programming Command Manual - Page 116
    Width Magnification (mils) Factor 02 10.0 75% 03 15.0 112% 04 20.0 150% Example H100V100BD4031001234567 Notes 1. D4 provides guide bars that extend longer than the reset of the bar code. and the human readable text below the symbol. 2. The check digit is automatically
  • Oki X400 | X400 Programming Command Manual - Page 117
    Industrial Two of Five Command Structure 1:3 ratio 2:5 ratio 1:2 ratio B5bbccc (data) BD5bbccc (data) D5bbccc (data) bb = ccc = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Bar code data (numeric); must be an even number of digits or else the
  • Oki X400 | X400 Programming Command Manual - Page 118
    Matrix Two of Five Command Structure 1:3 ratio 2:5 ratio 1:2 ratio B6bbccc (data) BD6bbccc (data) D6bbccc (data) bb = ccc = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Bar code data (numeric); must be an even number of digits or else the printer
  • Oki X400 | X400 Programming Command Manual - Page 119
    Code 128 Command Structure BGbbcccdd (data) bb = ccc = dd = (data) = Width of narrow element in dots (01~12). Bar height in dots (001~999) Start code to specify initial subset of bar code data. >G Subset A Start code. >H Subset B Start code. >I Subset C Start code. Includes bar code data and
  • Oki X400 | X400 Programming Command Manual - Page 120
    Character Table The Code 128 table lists 105 data values for the three subsets: A, B and C. Each subset column displays either a single column of data or a double column of data. If the subset column displays a single column of data, this is the data to be entered to produce the result. If the
  • Oki X400 | X400 Programming Command Manual - Page 121
    VALUE 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 SUBSET A SUBSET B SUBSET C SP SP 00 ! ! 01 " " 02 # # 03 $ $ 04 % % 05 & & 06 ' ' 07 ( ( 08 ) ) 09 * * 10 + + 11 , , 12 - - 13 . . 14 / / 15 0 0
  • Oki X400 | X400 Programming Command Manual - Page 122
    72 BS h 73 HT i 74 LF j 75 VT k 76 FF l 77 CR m 78 SO n 79 SI o 80 DLE p 81 DC1 q 82 DC2 r 83 DC3 s 84 DC4 t 85 NAK u 86 SYN v 87 ETB w 88 CAN x 72 89 EM y 89 73 90 SUB z 90 74 91 ESC { 91 75 92 FS | 92 76 93 GS } 93 77 94
  • Oki X400 | X400 Programming Command Manual - Page 123
    MSI Command Structure 1:3 ratio 2:5 ratio 1:2 ratio BAbbccc (data) d BDAbbccc (data) d DAbbccc (data) d bb = ccc = (data) = d = Width of narrow element in dots (01~12).
  • Oki X400 | X400 Programming Command Manual - Page 124
    Code 93 Command Structure 1:3 ratio BCbbcccdd (data) bb = ccc = dd = (data) = Width of narrow element in dots (01~12). Bar height in dots (001~999) Length of data (number of digits, 00~99). Bar code data (alphanumeric); length must match value of parameter "dd"; check digit is supplied by
  • Oki X400 | X400 Programming Command Manual - Page 125
    20.0 150% Example H100V100DE03100123456 H75V210OB0 H107V210OB123456 Notes Command DE provides guide bars that extend longer than the reset of the bar code. 123
  • Oki X400 | X400 Programming Command Manual - Page 126
    Bookland (UPC/EAN Supplement) Command Structure BFbbccc (data) bb = ccc = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Bar code data (numeric); must be exactly 2 or 5 digits. Character Set Density Table 0-9 (numeric only) Value of "bb" Narrow Bar Width
  • Oki X400 | X400 Programming Command Manual - Page 127
    UCC-128 Command Structure BIbbcccd (data) bb = ccc = d = (data) = Width of narrow element in dots (01~12) Bar height in dots (001~999) Placement of human readable text. 0 None 1 Text at top of bar code 2 Text at bottom of bar code 17 digits made up of the following: 1st digit = Container
  • Oki X400 | X400 Programming Command Manual - Page 128
    Example none of it will be printed. Care should be exercised when placing the bar code to allow for any automatically created human readable text. Without incrementing A H100V200BI04150101234567000000001 Q2Z With incrementing A H100V200F001+001 <
  • Oki X400 | X400 Programming Command Manual - Page 129
    and height are fixed and cannot be changed. 3. If the number of digits sent to the printer as data does not match one of the formats specified above (i.e. 5,6,9 or 11), the command is ignored and nothing will be printed. 4. If a "-" is included in the data stream (i.e. 84093-1565), it is ignored
  • Oki X400 | X400 Programming Command Manual - Page 130
    APPENDIX C. CUSTOM CHARACTERS AND GRAPHICS CUSTOM-DESIGNED CHARACTER The following example is presented to help understand the use of the Custom-Designed Characters command. It demonstrates the design and printing of an "arrow" in a 16x16 matrix. 1. Determine which matrix size to use. 16 dot x 16
  • Oki X400 | X400 Programming Command Manual - Page 131
    3. Transfer the image into two bit map representations and then into hexadecimal or binary format. ROW 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 BIT MAP HEX 0000 0001 0000 0000 01 00 0000 0011 1000 0000 03 80 0000 0111
  • Oki X400 | X400 Programming Command Manual - Page 132
    example for clarity only and are not included in the data string. Note that the data string is only half as long as the hexadecimal format. This is because we can send the binary equivalent of "11111111" (represented above in its hexadecimal value of FFH), for example, using one eight bit
  • Oki X400 | X400 Programming Command Manual - Page 133
    square represents one dot Blacken squares for each printed dot 3. Transfer the image into a bit map representation and then into hexadecimal format: BIT MAP HEXDECIMAL 1 2 3 4 5 6 12 34 5 6 11111111 11111111 11111111 11111111 11111111 11111111 FF FF FF FF FF FF 11111111 11111111 11111111
  • Oki X400 | X400 Programming Command Manual - Page 134
    11000000 00000000 00000111 11100000 00000000 00000011 C0 00 07 E0 00 03 11000000 00000000 00001111 11110000 00000000 00000011 C0 00 0F F0 00 03 11000000 00000000 00001111 11110000 00000000 00000011 C0 00 0F F0 00 03 11000000 00000000 00001111 11110000 00000000 00000011 C0 00 0F F0 00 03 11000000
  • Oki X400 | X400 Programming Command Manual - Page 135
    of "C0" as binary data (11000000). The BASIC program listing for sending this graphic to the printer (using the RS232 port) in binary format is: OPEN "COM2:9600,N,8,1,CD,DS" FOR OUTPUT AS #1 E$=CHR$(27) PRINT #1,E$;"A";E$;"H100";E$;"V100";E$;"GB006006"; PRINT #1,CHR$(&HFF);CHR$(&HFF);CHR$(&HFF);CHR
  • Oki X400 | X400 Programming Command Manual - Page 136
    PRINT #1,CHR$(&HC0);CHR$(&H00);CHR$(&H80);CHR$(&H00);CHR$(&H00);CHR$(&H13); PRINT #1,CHR$(&HC0);CHR$(&H00);CHR$(&HFF);CHR$(&HFF);CHR$(&HFF);CHR$(&HF3); PRINT #1,CHR$(&HC0);CHR$(&H00);CHR$(&H00);CHR$(&H00);CHR$(&H00);CHR$(&H03); PRINT #1,CHR$(&HC0);CHR$(&H00);CHR$(&H00);CHR$(&H00);CHR$(&H00);CHR$(&
  • Oki X400 | X400 Programming Command Manual - Page 137
    PRINT #1,E$;"Q1";E$;"Z" CLOSE #1 The printer output for both hexadecimal and binary format examples is: 135
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137

TABLE OF CONTENTS
OKIPOS X400 Programming Guide
Introduction
.........................
1
The Oki Data Programming Language
...............
1
Selecting Protocol Control Codes
................
2
Using Basic
..........................
2
Printing with the Parallel Port
...................
3
Printing with the RS232 Port
...................
4
The Print Area
........................
4
Rotated Fields
..........................
8
Command Default Settings
....................
8
Printer Configuration
......................
9
Label Sensing
.........................
9
Command Code Page Reference
..................
10
Barcodes
.........................
12
Barcodes, Expansion
....................
17
Barcodes, Variable Ratio
...................
18
Base Reference Point
....................
20
Characters, Custom-Designed
.................
22
Character Expansion
....................
24
Character, Fixed Spacing
...................
26
Character, Pitch
......................
27
Continuous Forms Printing
..................
29
Character, Proportional Spacing
................
30
Clear Print Jobs(s) & Memory
................
31
Copy Image Area
......................
32
Cutter Command
......................
34
Peeler Command
......................
35
Fonts, U, S, M, OA, OB, XU, XS & XM
............
36
Fonts, WB, WL, XB & XL
.................
38
Font, Vecor
........................
40
Form Feed
.........................
42
Form Overlay Recall
....................
43
Form Overlay Store
....................
44
Graphics, Custom
.....................
45
Graphics, PCX
......................
47
Journal Print
.......................
48
Lines and Boxes
......................
49
Print Darkness
......................
50
I