S5-95U, Second Serial Interface
ASCII Driver
4.5
Program Example for the ASCII Driver
In this section, the structure of a PLC program for the ASCII driver is explained.
Example:
The program generates a message list for output on the DR 211 printer. It automatically initiates a
printout in 2-second intervals.
Proceed as follows:
Connect the DR 211 printer to SI2 of the S5-95U via the respective cable ( Figure 4-4).
Switch on the printer and set the printer parameters in the menu at the printer.
Only the printer parameter blocks in which you must change the default parameters are represented
below (bold); parameters to be set are printed in italics:
TECHNICAL LIST:
USER LIST:
LINE CONTROL
LANGUAGE
PAPER COMMAND
PAPER C CR
MENU LANGUAGE
GERMAN
LINE OVERFLOW
CR + LF
CR
CR
PRINT DENSITY
LF
LF
CHARACTER PITCH
10 CPI
WIDE FONT
NO
INTERFACE SETTING
SERIAL INTERFACE
CHARACTER REPRESENTATION
RECEIVE BUFFER
17 KB
NATIONAL CHARACTER SET
0 (for ASCII)
DATA BITS
7 BIT
PARITY
EVEN
LINE SPACING
6 LPI
STOP BITS
2 STOP BITS
BAUD RATE
9600
PAPER FORMAT
PRINTER STATUS
ON LINE
FORM LENGTH (INCH)
12
ESCAPE CHARACTER
ESC
LINE LENGTH (1/10 INCH)
136
VERTICAL SPACING
VERTICAL SPACING
1/72 INCH
Switch printer to on-line (simply follow the menu of the printer).
EWA 4NEB 812 6095-02
4-17