[0001] The present invention relates to a printing apparatus capable of printing in both
directions on a print line basis, and specifically relates to a printing apparatus
wherein when printing a document on a plurality of print lines, intervals between
characters on each print line are kept constant, for instance on resumption of printing
after printing has been suspended.
[0002] Generally, some of printing apparatuses such as electronic typewriters and printers
are constituted so as to print, when print data sent from an external apparatus is
printed on a plurality of print lines, in one direction from the left margin position
to the right margin position, and some of printing apparatuses are constituted so
as to print in both the right direction and the left direction to improve the printing
speed.
[0003] Some printing apparatuses capable of printing in both directions have been proposed
wherein, as described in U.S. Pat. No. 3,764,994, when printing is made on the succeeding
print line, the left end print position (line-head print position) and the right end
print position (line-end print position) of that line are evaluated by arithmetic
operation, and the carriage is moved from the last print position of the preceding
line to the closest print start position, which is either the left end print position
or the right end print position (i.e. shortest-path control), and thereby the printing
speed is improved.
[0004] For example, as shown in Fig. 9, in the case where printing on a preceding print
line (a line segment F) in the right direction is completed, when a last print position
Ep thereof is located between a left end print position Lp and a right end print position
Rp of a succeeding print line (a line segment S), firstly a print paper is fed by
an amount of line space by a line feed processing, and subsequently, the carriage
is moved to the right end print position Rp, and the line end character is printed
on the right end print position Rp, and thereafter the control is performed so that
printing is made on the succeeding print line S while the carriage is moved sequentially
in the left direction.
[0005] In the above-described printing apparatuses capable of printing in both directions,
various ingenuities have been made for the control for improving the printing speed
including the control for making the path of movement of the carriage shortest. For
example, as shown in Fig. 9, in the case where printing on the preceding print line
F in the right direction is completed, the carriage is moved from the last print position
Ep thereof to the right end print position Rp, and the line end character is printed
on the right end print position Rp and thereafter printing on the succeeding print
line S is made while the carriage is moved sequentially in the left direction, the
line end character is printed in the state that the carriage is driven in the right
direction, but characters other than the end character are printed in the state that
the carriage is driven in the left direction.
[0006] In this case, the character interval between the end character and the character
succeeding the end character becomes smaller than the character interval between other
characters due to elongation of a wire or belt and backlash of gears of the driving
means for driving the carriage, and therefore the character intervals are not kept
constant on the same print line, and positional deviation of printed characters takes
place also between the preceding and succeeding print lines, and thus a problem exists.
[0007] On the other hand, some other apparatuses have the following configuration as disclosed
in Japanese Pat. Provisional Publication No. 58-71185. In the course of printing text
data stored in the text memory or print data sent from an external apparatus, printing
is suspended according to opening of a cover or operating of a stop key to replace
a print ribbon or a typewheel, and work of replacing the print ribbon or the typewheel
is performed with the cover opened, and thereafter the cover is closed or a restart
key is operated to resume the printing, and then the carriage is moved to the origin
setting position to set the original position of the carriage, and thereafter the
carriage is moved to the succeeding print position, and the printing is resumed.
[0008] In the above-described printing apparatuses, in the case where the moving direction
of the carriage is reverse to the succeeding print direction when the carriage is
returned to the succeeding print position to resume printing after suspension thereof,
the moving direction of the carriage is reversed after it has been moved to the succeeding
print position, and therefore the interval between the character printed before and
the character printed on the succeeding print position is elongated and the following
character interval is reduced due to backlash and wire extension of the carriage driving
means, and thus a problem exists.
[0009] A first object of the present invention is to provide a printing apparatus capable
of keeping intervals between printed characters on each print line constant when printing
in both directions is performed across a plurality of print lines, by means of regulating
positional errors of the carriage due to backlash of gears and elongation of a wire
or belt of the carriage driving means.
[0010] A second object of the present invention is to present a printing apparatus capable
of preventing variation of character intervals when resuming printing, by regulating
positional errors of the carriage before resuming printing.
[0011] In a first aspect the present invention provides a printing apparatus having memory
means for storing code data of characters to be printed so as to correspond to each
print position; printing means having a print head mounted on a carriage; carriage
driving means for driving the carriage movable along a print line for printing characters
corresponding to code data in the memory means on a print paper; print direction control
means for controlling the carriage driving means to move the carriage forward or backward
while printing along each print line so that the carriage moves along a shortest path;
judging means for judging according to data in the memory means whether or not theprint
end position of a present print line is located between the print start position and
the print end position of the succeeding print line in the carriage driving direction;control
means controlling the carriage driving means to move the carriage, when the print
end position of the present print line is located between the print start position
and the print end position of the succeeding print line, to a preceding print position
which precedes said print start position in the print direction of the succeeding
print line and subsequently to move the carriage to the print start position.
[0012] The second aspect of the present invention provides a printing apparatus having memory
means for storing code data of characters to be printed so as to correspond to each
print position; printing means having a print head mounted on a carriage; carriage
driving means for driving the carriage along a print line for printing characters
and symbols corresponding to code data in the memory means on a print paper; print
direction control means for controlling the carriage driving means to move the carriage
forward or backward while printing along each print line so that the carriage moves
along a shortest path; original position setting means for setting an original position
of the carriage at one movement limit position ; print suspending means for controlling
the printing means to suspend printing according to a suspension command signal; print
resuming means for controlling the carriage driving means to move the carriage, when
the print suspending means is released, to a print resuming position where printing
is to be resumed, after setting the carriage to the original position by the original
position setting means; regulating means for regulating backlash in the carriage driving
means before resuming printing, when the moving direction of the carriage in moving
from the movement limit position to the print resuming position where printing is
to be resumed is reverse to the print direction in which printing is to be resumed.
[0013] In a printing apparatus in accordance with the first aspect, the printing means is
controlled so as to make printing in both directions while the carriage is moved forward
and backward on a print line basis.
[0014] Then, when the judging means judges that the print end position of a print line is
located between the print start position and the print end position of the succeeding
print line, the controlling means moves the carriage to the preceding print position
side from the print start position of the succeeding print line, with the print direction
of the succeeding print line taken as a reference, after printing of the present print
line has been completed, and thereafter moves the carriage to the print start position
of the succeeding print line.
[0015] Accordingly, all characters of each print line are printed on the carriage being
moved in the same direction, and therefore intervals between printed characters are
kept constant without being affected by backlash, wire extension or the like of the
carriage driving means, and thus the printed document is more smart.
[0016] In a printing apparatus in accordance with the second aspect, the original position
of the carriage is set before printing. The printing means is controlled so as to
make printing in both directions while moving the carriage forward and backward on
a print line basis.
[0017] When the printing operation is suspended by the print suspending means in the course
of printing and then the print suspending means is released to continue the printing
again, the original position of the carriage is set by the original position setting
means, and thereafter the print resuming means returns the carriage to the succeeding
print position. Then, where the moving direction of the carriage when returning to
the succeeding print position is reverse to the succeeding print direction, a positional
error of the carriage due to backlash and extension of wire or belt is corrected by
the regulating means before resuming the printing.
[0018] Irregular intervals between printed characters when resuming the printing can be
prevented and thereby accurate printing can be performed irrespective of the succeeding
print direction.
[0019] The invention will be better understood from the following description of exemplary
embodiments which are illustrated in the drawings in which:-
Fig. 1 through Fig. 6(b) relate to a first embodiment, and Fig. 1, Fig. 7 and Fig.
8 relate to a second embodiment.
Fig. 1 is a perspective view of an electronic typewriter;
Fig. 2 is a block diagram of a controlling system of the electronic typewriter in
Fig. 1;
Fig. 3(a), Fig. 3(b) and Fig. 3(c) are flow charts of control routine of printing
in both directions;
Fig. 4(a) through Fig. 4(j) are explanatory views showing relations of relative positions
of a preceding print line and a succeeding print line, respectively;
Fig. 5 is a modified fragmental flow chart of the control routine of printing in both
directions;
Fig. 6(a) and Fig. 6(b) are modified fragmental flow charts of the control routine
of printing in both directions, respectively;
Fig. 7 is a block diagram of a modified controlling system of the electronic typewriter
in Fig. 1;
Fig. 8 is a flow chart of a control routine of regulating backlash;
Fig. 9 is a view in accordance with the prior art equivalent to Fig. 4(b).
The First Embodiment (Fig. 1 to Fig. 6(b.))
[0020] Hereinafter, description is made of a first embodiment of the present invention based
on the drawings.
[0021] This embodiment is of the case where the present invention is applied to an electronic
typewriter.
[0022] As shown in Fig. 1, a keyboard 3 is disposed in the front part of a main frame 2
of an electronic typewriter 1, and a printing mechanism PM is installed behind the
keyboard 3 in the main frame 2, and a one-line liquid crystal display 75 for displaying
inputted characters and symbols is installed in the rear part of the keyboard 3.
[0023] On the keyboard 3, character keys 10 including alphabet keys, numeral keys and symbol
keys, a print start key 11 for printing text data of a text memory 52, a return key
12 and other various function keys 13, 14 are installed as on normal typewriters.
[0024] As illustrated in Fig. l and Fig. 2, the printing mechanism PM is provided with at
least a platen 20 for feeding a print paper 15, a line feed motor 89 for driving it
and a line feed drive circuit 89a, a carriage 22 supported by a guide 21 parallel
with the platen 20, a carriage drive motor 90 for driving the carriage 22 right and
left in a reciprocating fashion and a carriage drive circuit 90a, a typewheel 24 housed
in a wheel cassette 23 and a typewheel drive motor 96 for driving it and a typewheel
drive circuit 96a, a print ribbon 26 stored in a ribbon cassette 25 and a ribbon drive
motor 97 for taking-up it and a ribbon drive circuit 97a, a print hammer for hammering
a type element 27 of the typewheel 24 and a hammer solenoid 28 for driving it and
a hammer drive circuit 28a, a ribbon change-over mechanism selectively disposing the
print ribbon 26 or a correction ribbon 29 at the print position, and this printing
mechanism PM is similar to the printing mechanism of normal electronic typewriters.
In addition, numeral 4 designates a cover capable of opening and closing which shutters
the top opening part of a space wherein the carriage 22 moves.
[0025] The carriage 22 is driven so as to reciprocate forward and backward along a print
line on the print paper 15 by means of a well-known carriage driving means CM disclosed,
for example, in U.S. Pat. No. 4,044,882. This carriage driving means CM comprises
a carriage drive motor 90 installed near a left-side wall of the frame 2, a driving
gear 91 on a motor-shaft of the motor 90, a transmitting gear 92 engaged with the
driving gear 91, a driving pulley 93 formed integrally with the gear 92, a driven
pulley (not shown) installed near a right-side wall of the frame 2, and a wire 94
which is engaged with two pulleys and fixed to the carriage 22 at both ends.
[0026] Basically, the electronic typewriter 1 is constituted with the key board 3, the printing
mechanism PM, a displaying mechanism D, a controlling apparatus C, and the keyboard
3, the printing mechanism PM and the displaying mechanism D are connected to a main
CPU (Central Processing Unit) 30 of the controlling apparatus C through a bus 31 including
data bus and address bus.
[0027] The controlling apparatus C is constituted with the main CPU 30, a ROM (Read Only
Memory) 40 and a RAM (Random Access Memory) 50 connected to the CPU 30 through the
bus 31.
[0028] A program memory 41 of the ROM 40 stores a control program for controlling the printing
mechanism PM and the displaying mechanism D in correspondence to code data inputted
from each character key 10 and each function key 13, 14 on the keyboard 3, a control
program for controlling printing in both directions as described later.
[0029] The RAM 50 is provided with a present position memory 51 for sequentially renewing
and storing the present position of a print head 27a of the carriage 22 from the absolute
origin in correspondence to the print position, a printed data memory 55 for sequentially
storing about 500 characters of data such as characters printed in the typewriter
mode in correspondence to the print position, an input buffer 56 for storing data
such as characters which are inputted from the keyboard 3 or read from a text memory
52 in the memory mode (display mode), the text memory 52 for storing inputted data
as file data, a cursor display position counter 57 for counting the cursor display
position in response to a movement of the cursor in correspondence to each display
position of the display 75, a cursor position pointer 58 for pointing address of the
input buffer 56 corresponding to data of the cursor display position counter 57, a
print direction flag 53 which is set when printing is made in the right direction
(forward direction) and is reset when printing is made in the left direction (backward
direction) in printing text data of the text memory 52, a print buffer 54 for sequentially
reading text data of one print line to be printed from the text memory 52 or an external
apparatus and storing it when the print start key 11 is operated, a left margin position
memory 59 for storing the set left margin position, a pitch memory 60 for storing
the set print pitch, and the like.
[0030] In addition, the text memory 52 stores an EOT (End of Text) code following the last
data of text data.
[0031] The main CPU 30 makes the printing mechanism PM print a character or symbol corresponding
to the data inputted from each character key 10 based on the control program, and
makes the printed data memory 55 store the printed data in sequence in correspondence
to the print position. Furthermore, in the memory mode, the main CPU 30 makes the
input buffer 56 store the inputted data of one print line, makes the display 75 display
that data, and makes the text memory 52 store that data of one print line in response
to an operation of the return key 12.
[0032] The displaying mechanism D is constituted with an interface 70, a CPU 71 for display,
a character generator 72, a display controller 73, and the liquid crystal display
75, and the connection thereof is as shown in the diagram.
[0033] In addition, the displaying mechanism D is similar to the publicly known mechanism,
and does not relate directly to the present invention, and therefore description thereon
is omitted.
[0034] Next, description is made on the control of printing in both directions performed
by the controlling apparatus C of the electronic typewriter 1 with reference to the
flow chart in Fig. 3(a) through Fig. 3(c) together with Fig. 4 (a) through (j). In
Fig. 4 (a) through (j), a line segment F shows a character string printed on a preceding
line, and a line segment S shows a character string printed on a succeeding line.
Symbol Ep designates the last print position of the preceding print line, symbol Lp
designates the left end print position (line-head print position) of the succeeding
print line, symbol Rp designates the right end print position (line-end print position)
of the succeeding print line, a dotted line shows print paper feed, an arrow "→" shows
movement of the carriage 22 in the right direction and an arrow "←" shows movement
of the carriage 22 in the left direction.
[0035] By turning on the power switch of the typewriter 1, this control is started, and
processing proceeds to step S1 (hereinafter represented simply by S1, and the same
is true of the other steps), and initialization is executed in such a manner that
the print direction flag 53 is set to print characters on the preceding line in the
right direction (print direction flag data "1") and so on, and in S2, the typewriter
1 is ready for a key-input. When a key-input is given, processing proceeds to S3.
[0036] In S3, judgment is made on whether or not it is the print start key 11, and if it
is the print start key 11, processing proceeds to S4. In S4, text data of the first
one print line is read from the text memory 52, being written to the print buffer
54. In the following S5, judgment is made on whether or not text data exists based
on data of the text memory 52, and if text data exists, processing proceeds to S6.
In addition, after printing, the print head 27a is moved right by one character. At
this time, the main CPU 30 outputs a control signal to each drive circuit 89a, 90a,
96a, 28a, 97a, 99a of the printing mechanism PM. In addition, the print head 27a consists
of a print hammer, a type element 27 facing this print hammer and the print ribbon
26 facing this type element 27.
[0037] Next, in S7, data to be printed next is read from the print buffer 54. In S8, judgment
is made on whether or not that data is end data (EOT code), and if it is not the EOT
code, processing proceeds to S9. In S9, judgment is made on whether or not that data
is the last data of line, that is, data preceding by one character before return code,
and if NO, processing returns to S6. Then, S6 - S9 are repeated, and for example,
when printing is made up to data preceding by one character before the last print
position Ep of the line segment F as shown in Fig. 4 (a) through (j), judgment is
made to be YES, and processing proceeds to S10. In S10, the last data of print line
is printed on the last print position Ep. In addition, at this time, the print head
27a is located at the last print position Ep.
[0038] In S11, text data of the following one print line is read from the text memory 52,
being written to the print buffer 54. In S12, according to data of the present position
memory 51, data of the print buffer 54 and data of the pitch memory 60, the left end
print position Lp and the right end print position Rp of the line segment S in the
succeeding print line are evaluated by arithmetic operation, and judgment is made
on whether or not the last print position Ep is located between the left end print
position Lp and the right end print position Rp, and if the judgment is YES, positional
errors due to backlash and wire elongation of the driving means driving the carriage
22 is required to be regulated, and therefore processing proceeds to S13. For example,
as shown in Fig. 4 (b) and (e), the last print position Ep is located between the
left end print position Lp and the right end print position Rp of the line segment
S.
[0039] In S13, judgment is made on whether or not the absolute value of the last print position
Ep minus the left end print position Lp is smaller than the absolute value of the
last print position Ep minus the right end print position Rp, and if the judgment
results in YES, that is, when the movement of the carriage 22 from the last print
position Ep to the left print position Lp is shorter in path than the movement to
the right end print position Rp, processing proceeds to S14 (printing control of shortest
path). For example, such a case is as shown in Fig. 4(e).
[0040] In S14, according to the left end print position Lp and data of the present position
memory 51, the print head 27a (i.e. the carriage 22) is moved to the print position
higher by one character (in the direction of left margin) than the left end position
Lp. In the following S15, line feed processing is performed which feeds the print
paper 15 by an amount of a set line space. Furthermore, in S16, the print head 27a
is moved to the left end print position Lp (refer to Fig. 4(e)).
[0041] In S17, according to data of the print direction flag 53, judgment is made on whether
or not the preceding print has been made in the right direction, that is, the present
data of the print direction flag 53 is "1". In this case, the data of the flag 53
is "1", and therefore processing returns to S6. When the data of the print direction
flag 53 is not "1", processing moves to S18, and when the data of the flag 53 is inverted
(if the flag data is "1", it is changed to "0", and if "0", to "1"), and processing
returns to S6.
[0042] On the other hand, if the judgment results in NO in S13, that is, when the movement
of the carriage 22 from the last print position Ep to the right end print position
Rp is shorter in path than the movement to the left end print position LP, processing
proceeds to S19. For example, such a case is as shown in Fig. 4(b).
[0043] In S19, according to the right end print position Rp and data of the present position
memory 51, the print head 27a is moved to the print position lower by one character
(in the direction of right margin) than the right end print position Rp. In the following
S20, line feed processing is performed which feeds the print paper 15 by an amount
of a set line space. In S21, the print head 27a is moved to the right end print position
Rp (refer to Fig. 4(b)). Then, in S22, judgment is made on whether or not the preceding
print has been made in the right direction, and if it has been made in the right direction,
processing proceeds to the above-mentioned S18, and if in the left direction, processing
returns to S6.
[0044] In S12, if the judgment is NO, that is, when it is judged that the last print position
Ep is not located between the left end print position Lp and the right end print position
Rp, positional errors of the carriage 22 is not required to be regulated, and therefore
processing proceeds to S23. For example, as shown in Fig. 4(a), (c) and (d), the last
print position Ep is not located between the left end print position Lp and the right
end print position Rp of the line segment S.
[0045] In S23, judgment is made on whether or not the absolute value of the last print position
Ep minus the left end print position Lp is smaller than the absolute value of the
last print position Ep minus the right end print position Rp, and if the judgment
results in YES, that is, when the movement of the carriage 22 from the last print
position Ep to the left end print position Lp is shorter in path than the movement
to the right end print position Rp (printing control of shortest path), processing
proceeds to S15. For example, such a case is as shown in Fig. 4(d). Also, if the judgment
results in No, that is, when the movement of the carriage 22 from the last print position
Ep to the right end print position Rp is shorter in path than the movement to the
left end print position Lp, processing proceeds to S20. For example, such a case is
as shown in Fig. 4 (a) and (c).
[0046] Then, when the print direction becomes left and flag data "0" is written to the print
direction flag 53, printing is controlled through S6 - S23 likewise the case of printing
in the right direction.
[0047] This means that, for example, in the case of Fig. 4(g), control of printing in both
directions is performed including regulation of positional errors of the carriage
22 through S6 - S18, and in the case of Fig. 4(j), control of printing in both directions
is performed including correction of positional errors of the carriage 22 through
S6 - S13 and S19 - S22. In the case of Fig. 4 (f) and (h), control of printing in
both directions is performed without regulation of positional errors of the carriage
22 through S6 - S12, S23 and S15 - S18, and further in the case of Fig. 4(i), control
of printing in both directions is performed without regulation of positional errors
due to backlash and wire elongation of the driving means of the carriage 22 through
S6 - S12, S23 and S20 - S22.
[0048] When all text data of the text memory 52 are printed, judgment is made to be YES
in S8, and processing proceeds to S24, print completing processing is executed which
clears data of the print buffer 54, and processing returns to S2.
[0049] In addition, if judgment is made to be NO in S5, processing proceeds to S25, and
alarm processing such as buzzer sounding is performed, and processing returns to S2.
In S3, if the judgment results in NO, that is, when a key other than the print start
key 11 is operated, processing proceeds to S26, and the processing corresponding to
the operated key is executed, and processing returns to S2.
[0050] As described above, in the case where printing in both directions is performed on
a print line basis on a plurality of lines including printing control of shortest
path and the last print position Ep is located between the left end print position
Lp and the right end print position Rp of the succeeding print line, when the print
head 27a is moved to the left end print position Lp[, the print head 27a is moved
to the print position of one character higher order than the left end print position
Lp, thereafter being moved to the left end print position Lp, and when the print head
27a is moved to the right end print position Rp, the print head 27a is moved to the
print position of one character higher order than the right end print position Rp,
thereafter being moved to the right end print position Rp. Therefore, each character
to be printed on each print line is printed by moving the carriage 22 in the same
direction. This means that the intervals between characters on the same line are kept
constant and thereby beautiful print of document can be performed.
[0051] In addition, in the above-described embodiment, in order to regulate positional errors
caused by a play of gears or elongation of a wire in the driving means of the carriage
22, when the print head 27a is moved, the print head 27a is moved by an amount with
one extra character and thereafter moved back by one character to the normal position,
but the extra amount of movement is not limited to one character, and in short, the
amount of movement has only to be enough to regulate the positional errors in the
carriage driving system.
[0052] In the control of printing in both directions in the above-mentioned first embodiment,
when printing is made on the succeeding print line by reversing the print direction,
the carriage 22 is moved with a predetermined extra amount set, and thereafter the
carriage 22 is moved back by the predetermined amount in the reverse direction, and
therefore an effect of backlash thereafter is prevented and the intervals between
characters are kept constant. However, actually, when printing is made on the succeeding
print line with the printing direction reversed, the print position of each character
on the succeeding print line deviates from that on the preceding print line. This
means that each print position of printing in the left direction after printing in
the right direction deviates right from each print position of printing in the right
direction. Also, each print position of printing in the right direction after printing
in the left direction deviates left from each print position of printing in the left
direction.
[0053] In order to prevent this positional deviation, such a configuration may be adopted
that a control routine of printing in both directions in the first embodiment is modified
partly as shown in Fig. 5, and when the printing direction is reversed after the above-described
regulation of positional errors has been made, the amount of rotation of the carriage
drive motor 90, that is, the amount of correction of backlash and wire elongation
is controlled so that the print position of each character to be printed in the left
direction (or right direction) corresponds to the print position of each character
to be printed in the right direction (or left direction).
[0054] Then, description is made on a control routine of this modified printing in both
directions with reference to a flow chart in Fig. 5. In S18, data of the print direction
flag 53 is inverted, and processing proceeds to S30. In S30, judgment is made on whether
or not the data of the print direction flag 53 has been inverted from "1" to "0",
that is, whether or not the printing direction has been inverted from right to left,
and when the judgment results in YES, processing proceeds to S31. In S31, the carriage
drive motor 90 is driven to make reverse rotation by an amount of rotation of the
carriage drive motor 90 during which the carriage 22 is not moved actually despite
the rotation of the carriage drive motor 90 (amount of regulation of the positional
errors), and the print head 27a is moved in the left direction by a predetermined
distance, and processing proceeds to S6.
[0055] When the judgment results in NO in S30, that is, when the data of the print direction
flag 53 is inverted from "0" to "1", processing proceeds to S32. In S32, the carriage
drive motor 90 is driven to make forward rotation by an amount of regulation of the
positional errors, and the print head 27a is moved in the right direction by a predetermined
distance, and processing proceeds to S6.
[0056] Thus, characters can be printed on predetermined positions without apparent deviation
on all print lines. In addition, the amount of regulation of the positional errors
may be obtained by measuring the distance of actual positional deviation, being stored
in the ROM 40 as data, or may be arbitrarily set by the operator.
[0057] These control routines of printing in both directions are not limited to the flow
charts as shown in Figs. 3(a) to 3(c) and Fig. 5, but they may be modified partly
to routines as shown in Fig. 6 (a) and (b).
Second Embodiment (Fig. 1, Fig. 7 and Fig. 8)
[0058] This second embodiment is an embodiment in the case where the present invention is
applied to a typewriter like the electronic typewriter 1 in the above-mentioned first
embodiment, and therefore description thereon is made using the same numerals and
symbols for designating the elements having the same function as that of the electronic
typewriter 1 of the above-mentioned first embodiment.
[0059] Next, description is made on the whole configuration of the control system of the
electronic typewriter based on a block diagram in Fig. 7.
[0060] Basically, the electronic typewriter 1 is constituted with the keyboard 3, the printing
mechanism PM, the displaying mechanism D, the controlling apparatus CA, and the keyboard
3, the printing mechanism PM and the displaying mechanism D are connected to the CPU
(Central Processing Unit) 130 of the controlling apparatus CA through a bus 131 including
data bus and address bus.
[0061] To one input port of the CPU 130, a cover switch 80 for detecting the state of opening
and closing of the cover 4 for shutting the top opening part of a space wherein the
carriage 22 moves is connected by a connecting wire 81, and the other end of the cover
switch 80 is grounded, and the intermediate part of the connecting wire 81 is connected
to a 5V reference voltage line Vc through a pull-up resistor 82.
[0062] Then, when the cover 4 is closed, the cover switch 80 is closed and a "L"-level signal
is inputted to the input port, and when the cover 4 is opened, the cover switch 80
is opened and a "H"-level signal is inputted to the input port. The controlling apparatus
CA is constituted with the CPU 130, the ROM (Read Only Memory) 140 and the RAM (Random
Access Memory) 150 connected to the CPU 130 through the bus 131.
[0063] A program memory 41A of the ROM 140 stores in advance a control program for controlling
the printing mechanism PM and the displaying mechanism D in correspondence to code
data inputted from each character key 10 and various function keys 13, 14 on the keyboard
3, a control program for setting the original positions of the typewheel 24 and the
carriage 22 in the state that the carriage 22 is brought in contact with a stopper
95 in the vicinity of the left-side wall of the frame 2, a printing control program
for making printing in both directions while the carriage 22 is moved forward and
backward on a print line basis, a control program for controlling correction of the
backlash and wire elongation as described later, and the like.
[0064] The RAM 150 is provided with the present position memory 151 for sequentially renewing
and storing the present position of the carriage 22 (i.e. the present position of
the print head 27a) from the absolute origin in correspondence to the print position,
a key buffer 162 for temporarily storing data which is inputted from the keyboard
3 or is read from the text memory 152, a line buffer 160 for storing data of at least
one print line from the key buffer 162 or the text memory 152 in correspondence to
the print position, a relocation position memory 161 for storing data of the last
print position, the print direction flag 153 which is set when the print direction
is right and is reset when the print direction is left in printing text data of the
text memory 152.
[0065] In addition, the text memory 152 stores EOT (End of Text) code following the last
data thereof.
[0066] The CPU 130 makes the printing mechanism PM print characters and symbols corresponding
to data inputted from each character key 10, and simultaneously makes the line buffer
160 sequentially store that data in correspondence to the print position based on
the control program in the typewriter mode. Furthermore, in the memory mode, the CPU
130 makes the line buffer 160 store inputted data of one print line, and simultaneously
makes the displaying mechanism D display it, and makes the text memory 153 store that
one line of data in response to an operation of the return key 12.
[0067] The displaying mechanism D has a general configuration comprising the display 75
consisting of a liquid crystal displaying apparatus and a display controller 73A outputting
a drive signal to the display 75.
[0068] Next, description is made on a flow chart of positional error regulating control
performed by the controlling apparatus CA of the typewriter 1 with reference to Fig.
8(a) and Fig. 8(b). In addition, the description is made by exemplifying a memory
dumping processing routine dumping text data stored in the text memory 152 in a manner
of printing in both direction.
[0069] First, an area, that is, a name of file storing desired text data to be printed is
specified by operating the character key 10 and function keys 13, 14. Then, when the
print start key 11 is operated to print the inputted data stored in the text memory
152, the main routine is started, and processing proceeds to step 1 (hereinafter represented
simply as S1, and the same is true of the other steps), and judgment is made on whether
or not the character data to be printed is stored in the specified file of the text
memory 152, and if the judgment is YES, processing proceeds to S2, and if the judgment
is NO, processing proceeds to S3, and alarms the operator by a buzzer, returning to
the main routine.
[0070] In S2, text data of one print line stored in the text memory 152 is written to the
line buffer 160, and processing proceeds to S4. In S4, whether or not the cover 4
is opened is judged based on an open/close signal from the cover switch 80, and if
the judgment is NO, that is, when the "L"-level signal is given, processing proceeds
to S5, and text data of one character is read from the line buffer 160, and processing
proceeds to S6. Then, in S6, judgment is made on whether or not that text data is
the end data (the EOT code data or not), and if the judgment results in NO, processing
proceeds to S7, and judgment is made on whether or not that data is line end code
data (for example, line feed code), that is, printing of one print line has been completed,
and if the judgment is NO, processing proceeds to S8, and characters corresponding
to the text data are printed. At this time, the CPU 130 outputs a signal to each drive
circuit of the printing mechanism PM.
[0071] In the following S9, based on the print direction flag 153, the print head 27a is
moved right when the flag 153 is set and is moved left when the flag 153 is reset
by one character, and processing proceeds to S10, and the present position of the
print head 27a is stored in the relocation position memory 161, and processing returns
to S4.
[0072] Thus, by repeating S4 - S10, the text data of the line buffer 160 is printed in sequence,
and when the data of line end is printed, the line end code data is read from the
line buffer 160, and if the judgment results in YES, processing returns to S2. Then,
the following text data of one print line is stored in the line buffer 160, and S4-S10
are repeated likewise the above-mentioned, and the text data is printed in sequence.
In addition, where the text data is the line end code data, the print direction flag
153 is changed-over from set to reset or from reset to set, and thereby the print
direction is reversed.
[0073] When the cover 4 is opened in the course of printing the text data to perform a work
such as replacing the print ribbon 26 or the typewheel 24, the cover switch 80 is
opened, and the "H"-level signal is sent to the CPU 130, and in S4, judgment is made
to be YES, and processing proceeds to S11. In S11, processing waits until the print
ribbon 26 is replaced and the cover 4 is closed again, that is, until the "L"-level
signal is outputted from the cover switch 80 to the CPU 130, and when the cover 4
is closed and the "L"-level signal is outputted to the CPU 130, processing proceeds
to S12.
[0074] In S12, the original position of the carriage 22 is set by moving the carriage 22
and bringing it in contact with a stopper 95 in the vicinity of the left-side wall
of the frame 2, and the original position of the typewheel 24 is set by rotating the
typewheel 24 in the state of contact with a stopper (not shown), and thereafter processing
proceeds to S13. In S13, based on data of the relocation position memory 161, the
print head 27a is moved to the relocation position, and processing proceeds to S14.
In addition, description on mechanical and electric configurations and controls thereof
for setting the original positions of the carriage 22 and the typewheel 24 are similar
to the printwheel homing apparatus disclosed in U.S. Pat. No. 4,264,220 or U.K. Pat.
Application No. 8800171.
[0075] In S14, based on the print direction flag 153, whether or not the print direction
is left is judged, and the judgment results in YES in the case of left direction (the
print direction flag 153 is reset), and processing proceeds to S15. In S15, the print
head 27a is moved to the print position lower (right side) by one character, and processing
moves to S16, and regulation of backlash and wire elongation is performed by moving
the print head 27a to the print position higher (left side) by one character again,
and processing proceeds to S5, and printing is resumed from the relocation position
halfway of printing. In addition, when the print direction is right, regulation of
backlash and wire elongation is not required, and therefore judgment is made to be
NO, and processing proceeds to S5.
[0076] Thus, when the text data is printed and the last text data is printed, the end data
(EOT code data) is read, and processing proceeds to S17, and ending processing such
as clearing of the line buffer 152 is performed, and thus processing goes through
a routine of dumping processing, returning to the main routine.
[0077] Thus, where a work such as replacement of the ribbon 26 is performed by opening the
cover 4 when the print direction is left and then the cover 4 is closed, the print
head 27a is returned to the relocation position after regulation of the positional
errors due to backlash and wire elongation, and therefore the character intervals
on the place where printing is resumed can be kept constant likewise the case where
the printing direction is right, and thereby accurate printing can be made.
[0078] In addition, in this embodiment, configuration is made in a manner that the original
position of the carriage 22 is set by bringing the carriage 22 in contact with a stopper
95 in the vicinity of the left-side wall of the frame 2, but configuration may be
made in a manner that the original position is set by bringing the carriage 22 in
contact with a stopper in the vicinity of the right-side wall of the frame 2, and
in this case, after suspending the printing by opening the cover 4 when the printing
direction is right, regulation of positional errors is performed.
[0079] In addition, in this embodiment, configuration is made in a manner that printing
is suspended and resumed based on the open/close signal of the cover 4, but configuration
may be made in a manner that printing is suspended based on a detection signal from
a ribbon end detecting means when the print ribbon 26 runs out, and printing is resumed
when the restart key is operated. In this case, when the print ribbon 26 runs out,
the "H"-level signal is sent to the above-mentioned input port of the CPU 130, and
when the restart key is operated, the "L"-level signal is sent to that port. In addition,
the above-mentioned ribbon end detecting means can be constituted with an aluminum
reflecting foil affixed to the ribbon end and a light emitter and a photoreceptor
which are installed in the carriage 22 so as to correspond to the aluminum reflecting
foil.
[0080] In addition, as shown in the Japanese Patent Application No. 61-269371 filed by the
applicant of the present invention, it is also possible that when the cover 4 is opened,
printing operation is suspended instantly, and when the cover 4 is closed, the above-mentioned
control of regulation of positional errors is performed by interrupt processing, and
printing is continued from the print position following the lastly printed position.
[0081] It is needless to say that the present invention is applicable also to various printers
having a gear mechanism in the carriage driving system such as thermal-head type printers,
wire-dot type printers, ink-jet type printers and laser printers besides the daisy-wheel
type typewriter of the above-mentioned embodiment.