[0001] This invention relates to a method and device for controlling a carriage motor and
paper feed motor of a printer.
[0002] Conventional control sequences of a carriage motor (hereinafter referred to as a
CR motor) and a paper feed motor (hereinafter referred to as a PF motor) are shown
in Figs. 1(A) and (B) which show the situation wherein a paper feed action is performed
in the course of printing. Specifically, as soon as deceleration
c begins in the drive sequence of the CR motor (Fig. 1(A)), acceleration
e begins in the drive sequence of the PF motor (Fig. 1(B)), and then, when the deceleration
g of the PF motor ends, the driving
a of the CR motor begins.
[0003] That is, after the paper feed action is completely terminated, it is judged whether
the printer is in a printable position. When the judgement result is YES, the driving
of the CR motor is started to re-start printing.
[0004] According to the foregoing prior art, there are the deceleration time of the PF
motor and the time of judging whether the printer is in the printable position between
the paper feeding (paper feed action) and the beginning of acceleration of the CR
motor. Such an interval of time is a cause to decrease the real print speed of the
printer because it is dependent on the drive time of the CR motor.
[0005] Is is an object of the present invention to remedy these problems of the prior art
and to provide a control method and device which allow to improve the real print speed
of a printer by shortening the dead time between the paper feeding and the beginning
of shift of a carriage.
[0006] This object is achieved with a control device and control method as claimed.
[0007] As will be appreciated, in the printer control system according to the present invention,
a judgement of printability after the execution of paper feeding is made before the
execution of that paper feeding. When a next print action is to be performed after
the paper feeding, the driving of the carriage motor is started in advance of the
termination of the paper feeding, so that the speed of the carriage motor reaches
a level adapted for the print action just at the moment when the paper feeding terminates.
Therefore, no judgement of printability is made between the paper feeding and the
subsequent shifting of the carriage, and no waste time for acceleration of the carriage
motor is spent between them.
[0008] One way of carrying out the invention is described in detail below with reference
to drawings which illustrate one specific embodiment only, and in which:
Figs. 1(A) and (B) are diagrams showing a conventional drive sequence of a CR motor
and that of a PF motor, respectively;
Fig. 2 is a general block diagram of an embodiment of the present invention;
Figs. 3(A) and (B) are a perspective view and a side view, respectively, showing the
relationship in arrangement between a carriage, a paper and a PE detector;
Figs. 4(A) and (B) are diagrams showing the drive sequence of a CR motor and that
of a PF motor, respectively, according to the embodiment of the present invention;
and
Fig. 5 is a flowchart showing the operation process of a CPU according to the embodiment
of the present invention.
[0009] Fig. 2 shows a general structure of a preferred embodiment of the present invention.
A printer control device 1 is connected via an interface (I/F) section 3 with an external
host computer 5. Supplied from the host computer 5 are print data, print control (e.g.
paper feed control) commands, etc. Such data is temporarily stored in the I/F section
3 or a RAM 15.
[0010] The I/F section 3 is connected via an address/data bus 7 with a CPU 9. The CPU 9
is connected via the bus 7 with a ROM 11, so that the print action is controlled in
accordance with a control program stored in the ROM 11. In control operation, the
CPU 9 reads and interprets the data stored in the I/F section 3, and if necessary,
refers to the signal from a paper existence (presence/absence) detector (hereinafter
referred to as a PE detector) 13, a variety of data (for print control) previously
stored in the ROM 11 or RAM 15, etc. Then, the CPU 9 performs calculation on such
data in accordance with the control program. Consequently, the CPU 9 sends various
control commands through the bus 7 to a CR motor drive circuit 17, a PF motor drive
circuit 19 and a head drive circuit 21.
[0011] The CR motor drive circuit 17 drives a CR motor 23 in accordance with the command
from the CPU 9; as a result, a carriage 25 shifts. The PF motor drive circuit 19 drives
a PF motor 27; as a result, a paper 29 is fed. Generally, each of the CR motor 23
and the PF motor 27 is a step motor; in this case, a count of steps of the step motor
determines the amount of shift of the carriage, or the amount of feed of the paper.
The head drive circuit 21 drives a print head 31 attached to the carriage 25 to perform
printing. A print action is carried out in response to the shifting of the carriage
25. The paper feeding is carried out while the carriage 25 is at a stop.
[0012] Figs. 3(A) and (B) show the relationship between the paper 29, the carriage 25 and
the PE detector 13. As illustrated by the arrow
h, the paper 29 is fed from the side of a paper supply guide 33 and inserted between
a platen 35 and a paper feed roller 37, and then, fed upward in front of the print
head 31 in response to the rotation of the platen 35 caused by the PF motor 27. The
feeding of the paper is performed using a line pitch previously stored in the RAM
15 (that is stored after being converted into the form of a step count of the PF motor
27) as a unit.
[0013] The carriage 25 reciprocatingly shifts along guide rods 39 in directions
i orthogonal to the paper feed direction
h. Generally, while the carriage 25 is shifting from left to right with respect to
the surface of the paper 29, the print head 31 is driven to perform printing. When
the printing of a given line is completed, the carriage 25 stops, the paper is fed
to bring about the next new line, and then the carriage 25 is re-shifted to perform
printing at the new line. The present invention primarily resides in the control of
paper feeding performed between two successive shift actions of the carriage 25. Whether
or not the present invention is applicable to such a paper feed control is previously
judged on the basis of the print control command read from the I/F section 3 by the
CPU 9.
[0014] The PE detector 13 is generally made of a microswitch. For example, the PE detector
13 is attached to the back side of the paper supply guide 33 such that its detecting
pin 13a projects from the surface of the paper supply guide 33. Thus, when the paper
29 is present on the detecting pin 13a, the PE detector 13 provides a paper presence
signal. When the paper 29 was fed and its rear edge has passed over the detecting
pin 13a, the output of the PE detector 13 changes from the paper presence signal to
a paper absence signal (a PE signal). At this moment of changing, the paper 29 still
has a printable space corresponding to the distance
L from the detecting pin 13a to a paper retaining plate 40 disposed ahead thereof.
The distance
L is called an override amount herein. The override amount
L is a constant depending on the attached position of the PE detector 13, which is
previously stored in the ROM 11 or RAM 15 after being converted into the form of
a step count of the PF motor 27.
[0015] The number of printable lines permitted within the override amount
L varies depending on the line pitch and a marginal width to be left on the side of
the rear edge of the paper. Format setting data including the line pitch, the marginal
width, the number of characters per line, an inter-character pitch, a character magnifying
factor, etc. are supplied from the host computer 5 to the printer control device 1
prior to the entry of print data, print action data such as print control commands,
etc. Such format data are sent from the I/F section 3 to the CPU 9 and written in
a dedicated area of the RAM 15.
[0016] The paper feeding of the embodiment which is performed between two successive shift
actions of the carriage 25 will be described with reference to Figs. 4(A) and (B)
and Fig. 5.
[0017] Fig. 4(A) shows the drive sequence of the CR motor 23, in which
j is an acceleration zone,
k is a constant-speed zone,
l is a deceleration zone, and
m is a stop zone. Fig. 4(B) shows the drive sequence of the PF motor 27, in which
o is an acceleration zone,
p is a constant-speed zone, and
q is a deceleration zone. As illustrated in Figs. 4(A) and (B) , the PF motor 27 is
started to accelerate at a deceleration beginning moment t1 of the CR motor 23, the
CR motor 23 is started to accelerate a second time at a moment t2 before the PF motor
27 stops, and the CR motor 23 comes to a constant-speed state just at a moment t3
when the PF motor 27 stops. The foregoing drive sequence system includes no waste
time between the termination of the paper feeding and the next shifting of the carriage;
thus, its temporal efficiency is very high. To realize such a drive sequence system,
it is necessary both to previously calculate the time
r from the acceleration beginning moment t1 of the PF motor 27 to the acceleration
beginning moment t2 of the CR motor 23 and to judge whether or not after the paper
feeding the paper 29 departs from the platen 25 within the time
r to result in a nonprintable state.
[0018] Fig. 5 shows the operation process of the CPU 9 performed to realize the drive sequence
of Fig. 4. The CPU 9 performs the process of Fig. 5 when it is instructed by the print
control commands read out of the I/F section 3 to shift the carriage, feed the paper,
and re-shift the carriage.
[0019] In step S 1 the driving of the CR motor 23 is started to shift the carriage. Then
it is judged whether the paper is present or not on the basis of the signal from the
PE detector 13 (step S2). When the paper is present, the drive sequence of the CR
motor and PF motor shown in Figs. 4(A) and (B) are performed, that is, the CR motor
23 is accelerated (zone j) to come to the constant-speed state (zone k). To obtain
an instructed shift amount of the carriage (generally given in the form of a step
count of the CR motor 23), the CR motor 23 is started to decelerate at a proper
moment t1. Concurrently with the beginning of deceleration, the PF motor 27 is started
to accelerate (step 53). While the PF motor 27 is in the constant-speed zone (p),
the CR motor 23 is at a stop (zone m). During the paper feeding, the time
r (called a precedence time) from the acceleration beginning moment t1 of the PF motor
27 to the next acceleration beginning moment t2 of the CR motor 23 is calculated (step
S4). The calculation of the precedence time
r is made on the basis of a paper feed amount instructed by, for example, the print
control command (that is generally given in the form of a line pitch amount from
the host computer 5 and is converted by the CPU 9 into the form of a step count of
the PF motor 27 on the basis of the line pitch data stored in the RAM 15) and on the
basis of the running characteristic data of the CR motor and PF motor previously stored
in the ROM 11 or RAM 15, in the following manner. That is, a required paper feed time
S (from the moment t1 to the moment t3) necessary to obtain the instructed paper
feed amount is calculated on the basis of the instructed paper feed amount and the
characteristic data, relating to acceleration, constant-speed and deceleration, of
the PF motor 27. The precedence time
r is calculated by subtracting the acceleration time
j of the CR motor 23 from the required paper feed time
S. Then, at the moment t2 when the elapsed time from the moment t1 reaches the calculated
precedence time
r, the CR motor 23 is started to accelerate (step S4). Subsequently, the PF motor 27
is started to decelerate (step S5), and at the position when the PF motor 27 stops,
there is obtained the instructed paper feed amount. At the stop moment t3 of the PF
motor 27, the CR motor 23 is put in the constant-speed drive state.
[0020] When in step S2 it is judged that the paper is absent, the following process is performed.
First, a remaining override amount stored in the RAM 15 is read (step 56). This remaining
override amount is indicative of the distance from the rear edge of the paper 29 after
the paper absence is detected by the PE detector 13 to the paper retaining plate
40. Although not shown in Fig. 5, when first starting the printing in relation to
the paper 29, the override amount
L is initially used and set as the remaining override amount. Accordingly, the remaining
override amount read out corresponds to the override amount
L at the moment of first paper feeding after the detection of paper absence, but to
the remaining override amount updated in step S11 (hereinafter described) at the moments
of second paper feeding and so on.
[0021] In next step S7, it is judged whether or not the space corresponding to the remaining
override amount minus the paper feed amount is printable. This judgement may be made
as follows. First, the paper feed amount instructed by the print control command is
subtracted from the remaining override amount, and further, the marginal width on
the side of the paper rear edge stored in the RAM 15 is subtracted from the above.
The thus calculated amount is indicative of the space for printing. If this space
is greater than the size of characters based on the character magnifying factor stored
in the RAM 15, this is judged to be printable.
[0022] When in step S7 it is judged that the paper is printable, similarly to the case of
the paper being present, the sequences shown in Figs. 4(A) and (B) are performed
(steps S8, S9, S10). Then, in preparation for a next paper feed control, the (current)
remaining override amount minus the current paper feed amount is written in the RAM
15 as a new remaining override amount (step S11).
[0023] On the other hand, when in step S7 the space is judged to be non-printable, concurrently
with the starting of deceleration of the CR motor 23 (moment t1), the PE motor 27
is started to accelerate (step S12) to feed the paper by the remaining override amount,
and then, the PF motor 27 is decelerated and stopped (step S13). That is, in this
case, the paper 27 is detached from the platen 35. However, if desired, the step S13
may be modified such that the PF motor 27 is immediately stopped and the print control
action is terminated. The next shifting of the carriage that is instructed by the
print control command will be carried out after a new paper 29 is set.
[0024] In the foregoing manner, the control sequence is performed to shift the carriage,
feed the paper, and re-shift the carriage. In case another or subsequent sequence
of feeding the paper and shifting the carriage is to be performed subsequently to
the last sequence, the starting of acceleration of the CR motor in step S4 or S9
of the last sequence is considered to have corresponded to that of step S1 of the
subsequent sequence. Therefore, following the step S5 or S11 of the last sequence,
the step S2 and so on of the subsequent sequence are performed.
[0025] Although the foregoing is one preferred embodiment of the present invention, it is
not intended to have the present invention limited to the specific embodiment, and
many changes and modifications may be made. For example, although the embodiment
judges the presence/absence of the paper in step S2 of Fig. 5, each time the sequence
of feeding the paper and shifting the carriage is reached, another system may be
used in which a no-paper flag is set when the absence of the paper is detected, during
this flag being in the set state each sequence of feeding the paper and shifting the
carriage is repeatedly performed through step S6 to step S11, and if the judgement
of step S7 is NO, the no-paper flag is reset. Further, where the processing speed
of the CPU is sufficiently high, instead of individually performing each sequence
of feeding the paper and shifting the carriage, such individual sequences may be combined
beforehand into one longer sequence which is handled at one time. The foregoing embodiment
makes a judgement of printability after the paper feeding while considering the marginal
width on the side of the paper rear edge, the character magnifying factor, etc. so
that it can handle where these parameters are variable. However, where these parameters
are fixed, the override amount
L may be previously set by subtracting these parameters, and a judgement of printability
may be made by simply comparing the remaining override amount with the paper feed
amount; in this case, the judgement is "printable" if the former is larger, otherwise
"non-printable". Further, where the host computer is managing the paper rear margin,
the character magnifying factor, etc. so that the printer is not required to consider
such parameters, a judgement of printability can be made simply on the basis of the
override amount or the remaining override amount.
1. A control device of a printer configured so that printing is performed on a paper
(29) by shifting a carriage (25) with a print head (31) attached thereto by means
of a carriage motor (23), a next print action is performed after the paper is fed
by means of a paper feed motor (27) subsequently to the last print action if necessary,
there is included a paper detecting means (13) for detecting the presence/absence
of the paper, and a given printable space still remains on the paper when the output
of the detecting means changes from paper presence to paper absence, comprising;
an arithmetic means (9) for calculating, when the output of the detecting means (13)
is indicative of paper absence, the length of a printable space remaining in the paper
on the basis of the given printable space and a paper feed amount of paper feeding
having been performed after the output of the detecting means changes from paper presence
to paper absence,
a predicting means (9) for predicting, when the output of the detecting means is
indicative of paper absence, and on the basis of the remaining length and a paper
feed amount of paper feeding being expected to be performed after the print action,
the presence/absence of a printable space on the paper after the paper feeding expected
to be performed is performed,
a paper feed motor control means (9) for controlling, when the predicting means predicts
the presence of printable space, the driving of the paper feed motor (27) to perform
the paper feeding expected to be performed, and
a carriage motor control means (9) for the execution of the next print action subsequent
to the execution of the paper feeding expected to be performed, which starts the driving
of the carriage motor (23) in advance of the termi nation of the paper feeding expected
to be performed such that the speed of the carriage motor reaches a level adapted
for the print action when the paper feeding expected to be performed terminates.
2. A control device according to claim 1, wherein the paper feed motor control means
(9) always performs the paper feeding expected to be performed when the output of
the detecting means (13) is indicative of paper presence.
3. A control device according to claim 1, wherein the paper feed motor control means
(9) concurrently starts the driving of the paper feed motor (27) for the beginning
of execution of the paper feeding expected to be performed and the deceleration of
the carriage motor (23) for the termination of the preceding print action.
4. A control device according to claim 1, wherein the carriage motor control means
(9) predicts, on the basis of the paper feed amount of the paper feeding expected
to be performed and the running characteristic data of the paper feed motor (28) and
of the carriage motor (23), the time from the execution beginning moment of the paper
feeding expected to be performed to the beginning moment of the driving of the carriage
motor, and starts the driving of the carriage motor when the elapsed time from the
execution beginning moment of the paper feeding reaches the predicted time.
5. A control method of a printer configured so that printing is performed on a paper
(29) by shifting a carriage (25) with a print head (31) attached thereto by means
of a carriage motor (23), a next print action is performed after the paper is fed
by means of a paper feed motor (27) subsequently to the last print action if necessary,
the presence/absence of the paper is detected, and when the result of paper detection
changes from paper presence to paper absence, a given printable space still remains
in the paper, comprising the steps of;
calculating, when the detection result is indicative of paper absence, the length
of a printable space remaining on the paper on the basis of the given printable space
and a paper feed amount of paper feeding having been performed after the paper changes
from presence to absence,
predicting, when the detection result is indicative of paper absence, on the basis
of the remaining length and a paper feed amount of paper feeding being expected to
be performed after the print action, the presence/absence of a printable space on
the paper after the paper feeding expected to be performed is performed,
controlling, when the prediction result is indicative of space presence, the driving
of the paper feed motor to perform the paper feeding expected to be performed, and
starting, to perform the next print action subsequently to the execution of the paper
feeding expected to be performed, the driving of the carriage motor in advance of
the termination of the paper feeding expected to be performed such that the speed
of the carriage motor reaches a level adapted for the print action when the paper
feeding expected to be performed terminates.