The text of a manual · part 7 of 9
EasyCoder E4 Bar Code Label Printer Installation & Operation, pages 55 to 62
Pages 55 to 62 of 79: Appendix 3. Interfaces; Appendix 4. Programming
The original document is the PDF (1.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec E4
Page 55
Appendix 3
Interfaces Parallel Interface
The EasyCoder E4 has two interfaces: Parallel Centronics and Serial RS-232. Standard IEEE 1284-I compliant Interface Cable Computer end: Printer end:
Pin 1 2-9 10 11 12 13 14 15 16 17 18 19-30 31 32 33-35 36
54
Function /Strobe Data 0-7 Ack Busy Error Select Autofd N/C Signal ground Chassis ground Logic high Signal ground /Init /Fault N/C /Selectin
Depends on type of host computer. IBM-PC: DB-25pin male connector. 36pin female Centronics connector.
Transmitter Host Host Printer Printer Printer Printer Host
Printer Host Printer Host
Intermec EasyCoder E4 – Installation & Operation Ed. 2
Page 56
Appendix 3 Interfaces
Serial Interface
The EasyCoder E4 has two interfaces: Parallel Centronics and Serial RS-232. Protocol 9600 baud, No parity, 8 data bits, 1 stop bit (default.) To change the serial interface settings, use the SETUP command or read the suitable setup bar codes in Appendix 5 using the bar code wand. Interface Cable Computer end: Printer end:
Signal
Host DB-9
RXD TXD DTR GND DSR RTS CTS
2 3 4 5 6 7 8
DB-9pin or DB-25pin female connector depending on type of computer DB-9pin male connector.
DB-9 1 2 3 4 5 6 7 8 9
EasyCoder E4 Signal DB-9 +5V 150mA1 1 TXD 2 RXD 3 – 4 GND 5 RDY 6 CTS 7 RTS 8 – 9
Host DB-25 Signal 3 2 20 7 6 4 5
RXD TXD DTR GND DSR RTS CTS
1
/. Short-circuit protected.
Intermec EasyCoder E4 – Installation & Operation Ed. 2
55
Page 57
Appendix 4
Programming Introduction
As an alternative to the InterDriver or LabelShop, the EasyCoder E4 can be controlled directly from a host computer using the Intermec EasyCoder E4 Direct Protocol programming language. It is an easy-to-use printer protocol which is very similar with the Intermec Fingerprint-based Direct Protocol used with for example EasyCoder 501/601 XP and EasyCoder F2/F4 printers, but since the EasyCoder E4 has another type of electronics, there are some important differences. The Direct Protocol can be used to send instructions to the printer in two ways: • To create label formats consisting of fields with fixed or variable information. A format can then be selected and provided with variable input from the host computer in the form of a simple string of data. • To send input data and formatting instructions as a continuous string of data directly from the host computer. The EasyCoder E4 is designed to operate with anything from an unintelligent terminal to a mainframe computer system. The only requirement is that the host computer needs to be able to transmit characters in ASCII format. It is preferable to connect the printer to the host via the serial RS-232 port, which will provide two-way communication and enable printer errors to be returned. • If the printer is to be controlled via the Windows HyperTerminal or similar applications, connect via the serial RS-232 port. You can type commands directly into HyperTerminal, or compose them in a text editor like Notepad or Write and then paste them into the HyperTerminal (see the Microsoft Windows User’s Guide.) You will receive error messages from the printer.
Refer to the Intermec EasyCoder E4 Direct Protocol, Programmer’s Guide for more detailed programming information.
56
• If the printer is to be controlled via MS-DOS, connect via either the serial RS-232 port or the parallel Centronics port. You can use the DOS Edit program to compose the commands. To print, use DOS Edit’s File/Print command or use the DOS Copy or Type commands (see the MS-DOS User’s Guide.) You will not receive error messages from the printer. • If the printer is connected to a non-PC host computer, connect via the serial RS 232 port. You can type commands directly into the terminal or compose them in a text editor first. You will receive error messages from the printer. Intermec EasyCoder E4 – Installation & Operation Ed. 2
Page 58
Appendix 4 Programming
Programming a Label
Intermec Direct Protocol can be used to send instructions to the printer in two ways: • You can send individual commands which the printer will act on immediately, mainly for setting up the printer, retrieving information from the printer, and for managing files, fonts and images. Examples: PRINT KEY ON ↵ ? DATE$ ↵ KILL "LAYOUT1" ↵
(enable printing using the Feed button) (print the current date to the OUT channel) (delete a layout or file)
You can use this method to produce a label, because the printer will retain all label design instructions until you press Feed1 or send a PRINTFEED command. • You can create a text file containing all the commands necessary to lay out one or more labels and send it to the printer. If the text file contains a PRINTFEED command, the label will be printed out. If not, press Feed to print the label1. There are two types of label programming: • A fixed label design, where the printer prints exactly what you have programmed. • A layout (format) which may contain variables. Layouts can be saved and called up when required. The input data for the variables can be set by data strings from the host computer.
1
/. The Feed button will only produce a printout if it has been enabled using the PRINT KEY O N command. Otherwise, a blank copy will be produced each time the Feed button is pressed (formfeed.)
Intermec EasyCoder E4 – Installation & Operation Ed. 2
57
Page 59
Appendix 4 Programming
Programming a Label, cont.
A label design is made up of fields. There are five different types of field, each of which must be specifically formatted: • Text Field: A text field consists of a single line of text, formatted for font, magnification, rotation, and normal or inverse image. • Bar Code Field: A bar code field consists of a single bar code, with or without a bar code interpretation in human readable characters, formatted for type, height, bar ratio, magnification, rotation, interpretation On/Off, and interpretation font. • Image Field: An image field is a picture, drawing, logotype, or other type of illustration. Images sent to the printer should be in .PCX format, and formatted for magnification and normal or inverse image. Images can only be rotated by 180°. • Box Field: A box field is a square or rectangular area surrounded by a black border line, which must be formatted for height, width, line thickness and rotation. If the border is sufficiently thick, the whole area may appear black. • Line Field: A line field is a black line that goes either along or across the media feed direction, and is formatted for length, line thickness, and rotation. A short, thick line can look like a black box. There are no restrictions, other than the size of the memory, regarding the number of fields on a single label.
Box Field Bar Code Field (with interpretation) Text Field
ABC
Line Field
Image Field
58
Intermec EasyCoder E4 – Installation & Operation Ed. 2
Page 60
Appendix 4 Programming
Programming a Label, cont.
Positions on the printable area of the label are defined in terms of an X/Y grid, where the X-axis runs across the label and the Y-axis runs along the media path. The unit of measurement is dots (8 dots per mm/203.2 dots per inch.) The zero point (origin) is at the front left corner of the label as it emerges from the printer. This position is set up in the printer using the XStart value for the X-axis and the Startadj value for the Y-axis. All field locations are measured from this point. Setting the Startadj value to -152 will begin printing just inside the front edge of a label. The insertion point of any printable object is specified by the PRPOS (PP) command, followed by the X-coordinate, then a comma sign, and the Y-coordinate, for example PP 100,200. Any type of field should be specified with regard to its position, its alignment and its direction. If it is not specified, any previous relevant entry will be used. See the EasyCoder E4 Direct Protocol, Programmer’s Guide for more details.
Y-Axis
X-Axis
Zero reference point (X=0, Y=0)
Feed direction
Intermec EasyCoder E4 – Installation & Operation Ed. 2
59
Page 61
Appendix 4 Programming
Programming a Label, cont.
As an example, the programming for “My First Label” is included here to help you to get started with designing and programming your own labels and layouts. You can send the programme as a single string of data, with the individual commands separated by a colon sign. BF ON:BF "Swiss 721 BT",9,0:PP 10,20:PX 400,300,10: PP 25,25:PM "ROM:GLOBE.1":PP 75,250:BT "CODE39":PB "ABC":PP 75,200:FT "Swiss 721 BT",9,0:PT "My FIRST label!":PF ↵
You can also send the same data string line by line, or type it into a text editor and send it as a complete text file: ABC
BF ON ↵ (enable bar code interpretation) BF "Swiss 721 BT",9,0 ↵ (select interpretation font) PP 10,20 ↵ (insertion point for box field) PX 400,300,10 ↵ (create a box) PP 25,25 ↵ (insertion point for image field) PM "ROM:GLOBE.1" ↵ (select image) PP 75,250 ↵ (insertion point for bar code field) BT "CODE39" ↵ (select bar code type) PB "ABC" ↵ (input data to bar code field) PP 75,200 ↵ (insertion point for text field) FT "Swiss 721 BT",9,0 ↵ (select font for text field) PT "My FIRST label!" ↵ (input data to text field) PF ↵ (print one label)
If you wish to create a layout (format) which you can use to produce labels with different text or bar code content, you must do it in two steps. First create the layout:
↵ = Carriage Return
60
LAYOUT INPUT "LABEL1" ↵ (start layout recorder) BF ON ↵ (enable bar code interpretation) BF "Swiss 721 BT",9,0 ↵ (select interpretation font) PP 10,20 ↵ (insertion point for box field) PX 400,300,10 ↵ (create a box) PP 25,25 ↵ (insertion point for image field) PM "ROM:GLOBE.1" ↵ (select image) PP 75,250 ↵ (insertion point for bar code field) BT "CODE39" ↵ (select bar code type) PB VAR1$ ↵ (variable input data to bar code field) PP 75,200 ↵ (insertion point for text field) FT "Swiss 721 BT",9,0 ↵ (select font for text field) PT VAR2$ ↵ (variable input data to text field) LAYOUT END ↵ (save layout)
Intermec EasyCoder E4 – Installation & Operation Ed. 2
Page 62
Appendix 4 Programming
Programming a Label, cont.
Then add the variable data and a print instruction: LAYOUT RUN "LABEL1" ↵ (select layout) <STX> (start of input data, ASCII 02 dec) ABC ↵ (variable input data to VAR1$) My FIRST label! ↵ (variable input data to VAR2$) <EOT> (end of input data, ASCII 04 dec) PF ↵ (print one label) To print more than one label, add the number of copies to the PF (printfeed) command, for example PF 10. For details on formatting the fields, see the EasyCoder E4 Direct Protocol, Programmer’s Guide.
Intermec EasyCoder E4 – Installation & Operation Ed. 2
61