JPH064350B2 - Printer - Google Patents

Printer

Info

Publication number
JPH064350B2
JPH064350B2 JP24436285A JP24436285A JPH064350B2 JP H064350 B2 JPH064350 B2 JP H064350B2 JP 24436285 A JP24436285 A JP 24436285A JP 24436285 A JP24436285 A JP 24436285A JP H064350 B2 JPH064350 B2 JP H064350B2
Authority
JP
Japan
Prior art keywords
print
printing
data
counter
print data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP24436285A
Other languages
Japanese (ja)
Other versions
JPS62104783A (en
Inventor
雄二 飯田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba TEC Corp
Original Assignee
Tokyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tokyo Electric Co Ltd filed Critical Tokyo Electric Co Ltd
Priority to JP24436285A priority Critical patent/JPH064350B2/en
Publication of JPS62104783A publication Critical patent/JPS62104783A/en
Publication of JPH064350B2 publication Critical patent/JPH064350B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J5/00Devices or arrangements for controlling character selection
    • B41J5/30Character or syllable selection controlled by recorded information
    • B41J5/44Character or syllable selection controlled by recorded information characterised by storage of recorded information
    • B41J5/46Character or syllable selection controlled by recorded information characterised by storage of recorded information on internal storages

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、印字バッファの印字すべき印字データを格
納してから印字を行う印字装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printing apparatus that stores print data to be printed in a print buffer and then prints.

[従来の技術] 従来印字装置、例えば印字バッファに1行分の印字デー
タを格納するとともに、活字体を並べた印字ドラムを回
転させ、印字バッファの印字データと同じ活字体が印字
ハンマーの前を通過するときその印字ハンマーを打刻動
作して印字を行ない、印字ドラムが丁度1回転すると1
行分の印字が終了する印字装置が知られている。
[Prior Art] While storing one line of print data in a conventional printing device, such as a print buffer, and rotating a print drum on which print characters are arranged, the same print data as the print data in the print buffer is in front of the print hammer. When passing, the printing hammer is used to stamp and print, and when the printing drum makes one revolution,
2. Description of the Related Art A printing device that finishes printing lines is known.

[発明が解決しようとする問題点] しかしながらこの従来の印字装置では印字バッファに格
納されている印字データの内容に関係なく常に1行印字
するのに印字ドラムが1回転するに要する一定時間が必
要となり、印字のスピードアップ化を図れない問題があ
った。
[Problems to be Solved by the Invention] However, in this conventional printing apparatus, a constant time required for one rotation of the print drum is required for always printing one line regardless of the content of the print data stored in the print buffer. Therefore, there is a problem that the printing speed cannot be increased.

この発明はこのような問題を解決するために為されたも
ので、印字のスピードアップ化を図ることができる印字
装置を提供することを目的とする。
The present invention has been made to solve such a problem, and an object of the present invention is to provide a printing apparatus capable of speeding up printing.

[問題点を解決するための手段] この発明は、活字に対応した印字データを1行分格納す
る印字バッファを備え、その印字バッファの各桁の印字
データに基づいてプリンタ機構を動作して1行の活字を
順次印字する印字装置において、印字バッファに対して
1行分の印字データを格納するとき印字データの無い桁
に特定データを付加して格納する手段と、印字バッファ
の各印字データを印字する毎にその印字した印字データ
を特定データに変更する手段と、印字バッファの各桁が
すべて特定データになったとき1行の印字動作を停止制
御する手段とを設けたものである。
[Means for Solving Problems] The present invention includes a print buffer that stores print data corresponding to a print character for one line, and operates the printer mechanism based on the print data of each digit of the print buffer. In a printing device that sequentially prints the print characters of a line, when storing print data for one line in a print buffer, a means for adding specific data to a digit with no print data and storing each print data in the print buffer. There is provided means for changing the printed print data to specific data each time printing is performed, and means for controlling the stop of the printing operation of one line when all the digits of the print buffer become the specific data.

[作用] このような構成の本発明においては、先ず印字バッファ
に活字に対応した印字データを1行分格納する。このと
き印字データの無い桁に特定データを付加して格納す
る。そして印字バッファの各印字データを順次印字する
が、そのとき印字データを印字する毎にその印字データ
を特定データに変更する。そして印字バッファの各桁が
すべて特定データになったとき1行の印字動作を停止す
る。
[Operation] In the present invention having such a configuration, first, the print data corresponding to a print character is stored in the print buffer for one line. At this time, specific data is added to the digit having no print data and stored. Then, each print data in the print buffer is sequentially printed, and each time the print data is printed, the print data is changed to specific data. Then, when all the digits of the print buffer become the specific data, the printing operation of one line is stopped.

[実施例] 以下、この発明の実施例を図面を参照して説明する。な
お、この実施例はこの発明を電子キャッシュレジスタに
使用される印字装置に適用したものについて述べる。
Embodiments Embodiments of the present invention will be described below with reference to the drawings. In this embodiment, the invention is applied to a printer used for an electronic cash register.

第1図は電子キャッシュレジスタ全体の回路構成を示す
ブロック図で、1は電子キャッシュレジスタの制御部本
体を構成するメインCPU(中央処理装置)、2はこの
CPU1が各部を制御するための制御プログラムなどが
格納されたメインROM(リード・オンリー・メモ
リ)、3は印字データ処理のために必要なメモリ等が形
成されたメモリバックアップ機能が付いたメインRAM
(ランダム・アクセス・メモリ)である。また、4は表
示器5を制御する表示コントローラ、6はキーボード7
を制御するキーボードコントローラ、8はプリンタコン
トローラ9とでデータのやり取りを行うインターフェー
スである。前記CPU1とROM2、RAM3、表示コ
ントローラ4、キーボードコントローラ6、インターフ
ェース8とはバスライン10を介して接続されている。
FIG. 1 is a block diagram showing a circuit configuration of the entire electronic cash register, 1 is a main CPU (central processing unit) that constitutes the main body of the electronic cash register control unit, and 2 is a control program for the CPU 1 to control each unit. Main ROM (Read Only Memory) that stores, etc., 3 is a main RAM with a memory backup function that forms the memory required for print data processing
(Random access memory). Further, 4 is a display controller for controlling the display device 5, and 6 is a keyboard 7.
A keyboard controller 8 for controlling the printer controller 8 is an interface for exchanging data with the printer controller 9. The CPU 1, the ROM 2, the RAM 3, the display controller 4, the keyboard controller 6, and the interface 8 are connected via a bus line 10.

前記プリンタコントローラ9はCPU11、このCPU
11が各部を制御するためのプログラムデータが格納さ
れたROM12、データ処理用のメモリ等が形成された
RAM13、2つのI/Oポート14,15によって構
成されている。前記I/Oポート14にはプリンタ機構
16が接続され、前記I/Oポート15にはリセットパ
ルスセンサー17及びキャラクタパルスセンサー18が
接続されている。
The printer controller 9 is a CPU 11, and this CPU
Reference numeral 11 denotes a ROM 12 in which program data for controlling each unit is stored, a RAM 13 in which a data processing memory and the like are formed, and two I / O ports 14 and 15. A printer mechanism 16 is connected to the I / O port 14, and a reset pulse sensor 17 and a character pulse sensor 18 are connected to the I / O port 15.

前記プリンタコントローラ4はプリンタ機構16に対し
てI/Oポート14を介してプリンタモータ駆動信号S
、ハンマー信号S、スタンプ信号S、カット信号
、フィード信号Sをそれぞれ供給する。
The printer controller 4 sends a printer motor drive signal S to the printer mechanism 16 via the I / O port 14.
1 , hammer signal S 2 , stamp signal S 3 , cut signal S 4 , and feed signal S 5 are supplied respectively.

前記プリンタコントローラ9、プリンタ機構16に及び
各センサー17,18は印字装置を構成している。
The printer controller 9, the printer mechanism 16, and the sensors 17 and 18 form a printing device.

前記プリンタ機構16は第2図に示す構成になってい
る。すなわち、21は横に複数桁、縦に複数行の多数の
活字体を並べた印字ドラム、22は印字ドラム21の活
字体の各桁に対向して設けられた印字ハンマー、23は
レシート発行口24側に設けられたスタンプ機構、25
はレシート発行口24の近傍に設けられたカッタ機構で
ある。
The printer mechanism 16 has the structure shown in FIG. That is, 21 is a print drum in which a large number of print characters arranged in a plurality of columns horizontally and a plurality of lines in a row are arranged, 22 is a print hammer provided to face each digit of the print drum 21, and 23 is a receipt issuing port. Stamp mechanism provided on the side of 24, 25
Is a cutter mechanism provided near the receipt issuing port 24.

また、26はフィードローラ、27はピンチローラで、
これらはペーパガイド28,29によって案内されるレ
シート用紙30を挟持し、そのレシート用紙30を前記
印字ドラム21、スタンプ機構23、カッタ機構25の
前を介して前記レシート発行口24へフィード制御して
いる。
Further, 26 is a feed roller, 27 is a pinch roller,
These hold the receipt paper 30 guided by the paper guides 28 and 29, and feed the receipt paper 30 to the receipt issuing port 24 through the front of the printing drum 21, the stamp mechanism 23, and the cutter mechanism 25. There is.

前記印字ドラム21の回転軸には周面上に1ケ所マグネ
ット31を取付けたリセットパルス円板32及び歯車3
3を固定され、印字ドラム21と一緒に回転するように
なっている。前記歯車33には径のかなり小さい歯車3
4が歯合し、その歯車34の回転軸に周面上に2カ所マ
グネット35,36を取付けたキャラクタパルス円板3
7が固定され、その歯車34と一緒に回転するようにな
っている。
The rotation shaft of the printing drum 21 has a reset pulse disk 32 and a gear 3 on which a magnet 31 is attached at one location on the circumferential surface.
3 is fixed and is rotated together with the print drum 21. The gear 33 has a considerably small diameter.
Character pulse disk 3 in which 4 meshes, and magnets 35 and 36 are attached to the rotary shaft of the gear 34 at two locations on the circumferential surface.
7 is fixed and is adapted to rotate with its gear 34.

前記リセットパルス円板32の周面上方には検出コイル
からなる前記リセットパルスセンサー17が設けられ、
リセットパルス円板32のマグネット31が前を通過す
る毎にそのマグネット31を検出し、印字ドラム21が
1回転する毎にリセットパルス信号RPを発生してい
る。
The reset pulse sensor 17 including a detection coil is provided above the peripheral surface of the reset pulse disc 32.
Each time the magnet 31 of the reset pulse disk 32 passes in front, the magnet 31 is detected and the reset pulse signal RP is generated every time the print drum 21 makes one rotation.

前記歯車34は歯車33が1回転する間に印字ドラム2
1の活字体の行数分回転するもので、従ってキャラクタ
パルス円板37は印字ドラム21の活字体が印字ハンマ
ー22の前を通過する毎に1回転するようになってい
る。前記キャラクタパルス円板37の周面上方には検出
コイルからなる前記キャラクタパルスセンサー18が設
けられ、キャラクタパルス円板37のマグネット35,
36が前を通過する毎にそのマグネット35,36を検
出し、印字ドラム21の活字体がハンマー22の前を通
過する毎に2個のキャラクタパルス信号CPを発生して
いる。
The gear 34 is the print drum 2 while the gear 33 rotates once.
Therefore, the character pulse disk 37 is rotated once each time the character body of the printing drum 21 passes in front of the printing hammer 22. The character pulse sensor 18 including a detection coil is provided above the peripheral surface of the character pulse disk 37.
The magnets 35 and 36 are detected each time 36 passes through the front, and two character pulse signals CP are generated each time the character on the print drum 21 passes in front of the hammer 22.

前記印字ドラム21に配列されている活字体はレシート
などへの印字に必要な数字や文字、記号などで例えば第
3図に示すように横に11桁、縦に13行で、縦の13
行は「0」〜「C」の印字データで指示されるようにな
っている。なお、この図では説明上各活字は正常な向き
になっているが実際は印字されて正常な向きになるので
逆向きになっている。
The typefaces arranged on the printing drum 21 are numbers, letters, and symbols necessary for printing on a receipt or the like. For example, as shown in FIG. 3, there are 11 columns horizontally, 13 columns vertically, and 13 columns vertically.
The lines are designated by print data of "0" to "C". It should be noted that, in this figure, the respective characters are in the normal orientation for the sake of explanation, but they are in the opposite orientation because they are actually printed and are in the normal orientation.

前記RAM3には第4図に示すようにキーボード7など
から入力されるデータに基づいて編集された印字データ
を格納するための印字バッファ3、停電発生時に印字
データを退避させるための印字退避バッファ3が設け
られている。なお、各バッファ3、3には後述する
フィードフラグを格納するエリアF、Fがそれぞれ
設けられている。
Print save buffer for the said RAM3 for saving print data in the print buffer 3 1, when a power failure occurs for storing print data edited on the basis of data inputted from a keyboard 7 as shown in FIG. 4 3 2 is provided. Incidentally, the area F 1, F 2 for storing the feed flag to be described later are respectively provided in each buffer 3 1, 3 2.

前記プリンタコントローラ9のRAM13には第5図に
示すように印字データを格納するための印字バッファ3
、単なる印字かフィード印字かを区別するのに使用さ
れるフィードフラグFF、印字中か否かをカウントデー
タで示す印字カウンタPCT、印字ドラム21上の活字
体を示すキャラクタカウンタCHCT、キャラクタフラ
グCF、リセットパルス信号をカウントするリセットパ
ルスカウンタRPC、フィード量をカウントするフィー
ドカウンタFCTが設けられている。
The RAM 13 of the printer controller 9 has a print buffer 3 for storing print data as shown in FIG.
1 , a feed flag FF used to distinguish between simple printing and feed printing, a print counter PCT that indicates by count data whether printing is in progress, a character counter CHCT that indicates a character type on the printing drum 21, and a character flag CF A reset pulse counter RPC for counting the reset pulse signal and a feed counter FCT for counting the feed amount are provided.

前記プリンタコントローラ9のCPU11はROM12
のプログラムデータに基づいて第6図及び第7図に示す
処理を行う。
The CPU 11 of the printer controller 9 is a ROM 12
The processing shown in FIGS. 6 and 7 is performed based on the program data of FIG.

第6図はメイン処理を示すもので、電源がオンされる
と、先ずRAM13のメモリクリアを行ない、続いてC
PU1の制御によって送出される印字データなどのデー
タの受信に待機する。そして印字データの受信があると
先ず印字カウンタPCT及びフィードカウンタFCTが
それぞれ「0」になっているか否かチェックする。印字
カウンタPCT又はフィードカウンタFCTの一方又は
両方が「0」でなければ印字中あるいはフィード中であ
ると判断してインターフェース8を介してCPU1へ印
字応答を返して再度印字データの受信に待機する。また
印字カウンタPCT及びフィードカウンタFCTの両方
共「0」であれば印字中でもフィード中でもないと判断
して受信した印字データを印字バッファPBFに格納す
る。このとき印字データの無い桁には特定データ「F」
がセットされている。続いてフィードフラグFFが
「1」にセットされているか否かをチェックする。そし
てFF=1であればフィードを伴う印字であると判断し
てフィードカウンタFCTに「4」をセットしプリンタ
モータ信号S及びフィード信号Sをオンして印字、
フィードを開始させる。そしてこの制御が終了すると再
度印字データの受信に待機する。またFF=0であれば
フィード無しの印字であると判断して印字カウンタPC
Tに「E」をセットしプリンタモータ信号Sのみをオ
ンして印字を開始させる。そしてこの制御が終了すると
再度印字データの受信に待機する。
FIG. 6 shows the main processing. When the power is turned on, the memory of the RAM 13 is cleared first, and then C
It waits for reception of data such as print data sent under the control of PU1. When print data is received, it is first checked whether the print counter PCT and the feed counter FCT are "0". If one or both of the print counter PCT or the feed counter FCT is not "0", it is determined that printing or feeding is in progress, a print response is returned to the CPU 1 via the interface 8, and the printer waits for reception of print data again. If both the print counter PCT and the feed counter FCT are "0", it is determined that the print is not being performed or the feed is being performed, and the received print data is stored in the print buffer PBF. At this time, the specific data "F" is displayed in the digit without print data.
Is set. Then, it is checked whether or not the feed flag FF is set to "1". The printing by turning the printer motor signal S 1 and the feed signal S 5 is set to "4" to feed counter FCT it is determined that the printing with the feed if FF = 1,
Start the feed. When this control is completed, it waits for the reception of print data again. If FF = 0, it is determined that printing is performed without feed and the print counter PC
It is set to "E" to the T to turn on only the printer motor signals S 1 and to start printing. When this control is completed, it waits for the reception of print data again.

また、CPU1から受信したデータが停電命令のときに
は印字カウンタPCT及びフィードカウンタFCTがそ
れぞれ「0」になっているか否かをチェックし、印字カ
ウンタPCT又はフィードカウンタFCTの一方又は両
方が「0」でなければ印字中あるいはフィード中である
と判断してインターフェース8を介してCPU1へ印字
バッファPBFの内容を出力する。そして印字カウンタ
PCT及びリセットパルスカウンタRPCをそれぞれ
「0」にセットし、かつプリンタモータ信号S、ハン
マー信号S等の出力を停止させ、モータ、ハンマーな
どの動作を停止させ再度印字データの受信に待機する。
また印字カウンタPCT及びフィードカウンタFCTの
両方共「0」であれば印字中でもフィード中でもないと
判断して再度印字データの受信に待機する。
When the data received from the CPU 1 is a power failure command, it is checked whether the print counter PCT and the feed counter FCT are "0", and one or both of the print counter PCT and the feed counter FCT is "0". If not, it is judged that printing or feeding is in progress, and the contents of the print buffer PBF are output to the CPU 1 via the interface 8. Then, the print counter PCT and the reset pulse counter RPC are set to "0" respectively, and the output of the printer motor signal S 1 , the hammer signal S 2, etc. is stopped, the operation of the motor, the hammer, etc. is stopped and the print data is received again. To wait.
If both the print counter PCT and the feed counter FCT are "0", it is judged that the print data is not being fed and the feed counter FCT is waited for again to receive the print data.

第7図はキャラクタパルスCPの入力割込み処理で、キ
ャラクタパルス信号CPを入力すると、先ず同時にリセ
ットパルス信号RPの入力も有るか否かをチェックし、
リセットパルス信号RPの入力も同時に有れば印字ドラ
ム21が1回転してスタート位置に戻ったときなのでキ
ャラクタフラグCF及びキャラクタカウンタCHCTを
リセットして「0」にする。続いてリセットパルスカウ
ンタRPCが「3」になっているか否かをチェックす
る。これはリセットパルスカウンタRPCが「3」にな
らない場合にはプリンタモータが回転を開始して僅かの
時間しか経過していなく印字ドラム21が安定回転して
いないためこれをチェックしている。そしてカウンタR
PCが「3」になっていなければリセットパルスカウン
タRPCを+1する。またリセットパルスカウンタRP
Cが「3」であればカウンタRPCをそのままとする。
FIG. 7 shows the input interrupt processing of the character pulse CP. When the character pulse signal CP is input, it is checked whether or not the reset pulse signal RP is also input at the same time.
If the reset pulse signal RP is also input at the same time, it means that the printing drum 21 has made one rotation and returned to the start position, so that the character flag CF and the character counter CHCT are reset to "0". Then, it is checked whether or not the reset pulse counter RPC is "3". This is checked because when the reset pulse counter RPC does not reach "3", the printer motor starts rotating and only a short time has elapsed and the print drum 21 does not rotate stably. And the counter R
If PC is not "3", the reset pulse counter RPC is incremented by one. Also, reset pulse counter RP
If C is "3", the counter RPC is left unchanged.

また、同時にリセットパルスRPの入力が無ければ続い
てキャラクタフラグCFが「1」にセットされているか
否かをチェックし、「1」にセットされていればキャラ
クタフラグCFをリセットして「0」にするとともに、
キャラクタカウンタCHCTを+1する。このような処
理が終了すると続いてリセットパルスカウンタRPCが
「3」になっているか否かをチェックし、「3」になっ
ていなければこの割込み処理を終了し、また「3」にな
っていれば続いてフィードカウンタFCTが「0」であ
るか否かをチェックする。そしてフィードカウンタFC
Tが「0」でなければフィード処理中なのでフィードカ
ウンタFCTを−1し、そのフィードカウンタFCTが
「3」になったか否かをチェックする。そしてフィード
カウンタFCTが「3」になっていればフィード信号S
を出力してフィードマグネットをオンし、この割込み
処理を終了する。また、フィードカウンタFCTが
「3」になっていなければフィード信号Sの出力を停
止してフィードマグネットをオフする。さらにフィード
カウンタFCTが「0」か否かをチェックし、「0」で
あればフィード終了なのでフィードフラグFFをリセッ
トして「0」にするとともに印字カウンタPCTに
「E」をセットする。また「0」でなければこの割込み
処理を終了する。
At the same time, if the reset pulse RP is not input, it is subsequently checked whether or not the character flag CF is set to "1". If the character flag CF is set to "1", the character flag CF is reset to "0". And
The character counter CHCT is incremented by 1. After such processing is completed, it is checked whether or not the reset pulse counter RPC is "3". If it is not "3", this interrupt processing is terminated, and "3" is returned. Then, subsequently, it is checked whether or not the feed counter FCT is "0". And the feed counter FC
If T is not "0", feed processing is in progress, so the feed counter FCT is decremented by 1 and it is checked whether the feed counter FCT has become "3". If the feed counter FCT is "3", the feed signal S
5 is output, the feed magnet is turned on, and this interrupt processing is ended. In addition, to stop the output of the feed signal S 5 if the feed counter FCT is not set to "3" to turn off the feed magnet. Further, it is checked whether or not the feed counter FCT is "0". If the feed counter FCT is "0", the feed is completed, so the feed flag FF is reset to "0" and the print counter PCT is set to "E". If it is not "0", this interrupt process is terminated.

また、前記リセットパルスカウンタRPCのチェックに
続くフィードカウンタFCTのチェックにおいてそのフ
ィードカウンタFCTが「0」であれば続いて印字カウ
ンタPCTが「0」か否かをチェックする。そして印字
カウンタPCTが「0」であればこの割込み処理を終了
する。また印字カウンタPCTが「0」でなければ印字
中でありオンしているハンマーに相当する印字バッファ
PBFの各桁に特定データ「F」をセットし、ハンマー
信号Sの出力を停止する。そして1活字分の印字が終
了したので印字カウンタPCTを−1する。そして印字
カウンタPCTが全て「F」になっていれば印字カウン
タPCTをリセットして「0」にし印字動作を終了す
る。また、印字カウンタPCTが全て「F」でなければ
この割込み処理を終了する。
If the feed counter FCT is "0" in the check of the feed counter FCT following the check of the reset pulse counter RPC, then it is checked whether or not the print counter PCT is "0". Then, if the print counter PCT is "0", this interrupt processing is ended. The sets specific data "F" in each digit of the print buffer PBF the print counter PCT is equivalent to the hammer, which are on, it is under print not "0", and stops the output of the hammer signal S 2. Then, since the printing for one character is completed, the print counter PCT is decremented by one. If all the print counters PCT are "F", the print counter PCT is reset to "0" and the printing operation is completed. If the print counters PCT are not all "F", the interrupt process is terminated.

さらにリセットパルス信号RPの入力がなくキャラクタ
フラグCFが「1」にセットされていないときにはその
キャラクタフラグCFを「1」にセットし、続いてリセ
ットパルスカウンタRPCが「3」か、印字カウンタP
CTが「0」又は「E」かをチェックする。そしてリセ
ットパルスカウンタRPCが「3」でかつ印字カウンタ
PCTが「0」でも「E」でもないときのみ、すなわち
印字ドラム21が安定回転し印字中のときのみキャラク
タカウンタCHCTと一致するデータが印字バッファP
BFにあるとき相当するハンマーをオンして印字を行
う。
Further, when there is no input of the reset pulse signal RP and the character flag CF is not set to "1", the character flag CF is set to "1", and subsequently the reset pulse counter RPC is set to "3" or the print counter P.
Check if CT is "0" or "E". Then, only when the reset pulse counter RPC is "3" and the print counter PCT is neither "0" nor "E", that is, only when the print drum 21 rotates stably and is printing, the data which matches the character counter CHCT is printed. P
When in BF, the corresponding hammer is turned on to print.

前記CPU1は第8図及び第9図に示す処理を行う。The CPU 1 performs the processing shown in FIGS. 8 and 9.

第8図は停電が発生したときに停電割込み処理を示すも
ので、停電が発生するとそれを検出してプリンタコント
ローラ9に停電命令を送出する。次にプリンタコントロ
ーラ9からの印字データ(印字バッファPBFに残って
いる印字データ)の受信があるか否かをチェックする。
そして印字データを受信すればその受信データをRAM
3の印字退避バッファ3にセットする。また、印字デ
ータの受信がなければ印字退避バッファ3をクリアす
る。
FIG. 8 shows a power failure interrupt process when a power failure occurs. When a power failure occurs, it is detected and a power failure command is sent to the printer controller 9. Next, it is checked whether print data (print data remaining in the print buffer PBF) is received from the printer controller 9.
When print data is received, the received data is stored in RAM
3 is set in the print saving buffer 3 second. Also, it clears the print saving buffer 3 2 Without the reception of print data.

第9図は停電復帰時の処理を示すもので、印字退避バッ
ファ3に印字データがあればその印字データをプリン
タコントローラ9へ送出する。続いてキーボード7から
のキーインに待機する。この状態でキーインがあると押
されたキーによって表示、印字データを編集し、印字デ
ータについてはプリンタコントローラ9へ送出する。こ
のときプリンタコントローラ9から印字中の応答があれ
ば再度印字データを送出し直す。
Figure 9 is intended to show the processing at the time of recovery from the power failure, and sends the print data to the printer controller 9 if there is print data in the print saving buffer 3 2. Then, it waits for key-in from the keyboard 7. When there is a key-in in this state, the display and print data are edited by the pressed key and the print data is sent to the printer controller 9. At this time, if there is a response indicating that printing is in progress from the printer controller 9, the print data is sent again.

このような構成の本実施例においては、プリンタモータ
により印字ドラム21が回転するとキャラクタパルスセ
ンサー18からは第10図の(a)に示すキャラクタパ
ルスCPが発生する。またリセットパルスセンサー17
からは第10図の(b)に示すようなタイミング、すな
わち短い時間間隔で発生する2個のキャラクタパルスC
Pが13回発生する毎に1個のリセットパルスが発生す
る。そしてキャラクタフラグCFは第10図の(c)に
示すように2個のキャラクタパルスCPのうちの最初の
パルスでリセットされ、次のパルスでセットされる。ま
た、キャラクタカウンタCHCTは第10図の(d)に
示すように印字ドラム21の活字体がハンマー位置を通
過するに同期してその活字体が配列されている行を示す
「0」〜「C」のデータをサイクリックにカウントす
る。また、印字カウンタPCTは第10図の(e)に示
すように1行の印字開始から終了するまでをカウントす
る。すなわち印字ドラム21の活字体は11桁構成でこ
のため印字カウンタPCTは最初「E」にセットされ、
印字が進行するに従って減算カウントし最終には「4」
となり、印字が終了すると「0」となる。従ってカウン
ト値が「E」〜「4」にあるときには印字中となる。
In the present embodiment having such a configuration, when the print drum 21 is rotated by the printer motor, the character pulse sensor 18 generates the character pulse CP shown in FIG. Also reset pulse sensor 17
From FIG. 10, two character pulses C generated at a timing as shown in FIG.
One reset pulse is generated every time P is generated 13 times. The character flag CF is reset by the first pulse of the two character pulses CP and set by the next pulse, as shown in FIG. 10 (c). Further, the character counter CHCT indicates "0" to "C" which indicate the rows in which the character bodies of the printing drum 21 are arranged in synchronization with the character bodies passing through the hammer position, as shown in FIG. 10 (d). The data of "is counted cyclically. The print counter PCT counts from the start to the end of printing one line, as shown in (e) of FIG. That is, the typeface of the print drum 21 is composed of 11 digits, so that the print counter PCT is initially set to "E".
As the printing progresses, subtraction counts and finally "4"
And becomes "0" when printing is completed. Therefore, when the count value is "E" to "4", printing is in progress.

例えばキャラクタカウンタCHCTが「B」をカウント
している図中のタイミングで $4567=「F,F,F,F,C,4,5,6,7,
F,F」の印字データを受信すると、この印字データは
印字バッファPBFに格納される。このときフィードカ
ウンタFCTに第10図の(f)に示すように「4」を
セットする。そしてフィードカウンタFCTが「3」に
なるとフィードマグネットがオンして第10図の(g)
に示すようにフィードが行われ、その後の時点がキャ
ラクタパルスCPが発生したとき印字データの「4」と
キャラクタカウンタCHCTの「4」とが一致するので
一致した6桁目ハンマーが第10図の(k)に示すよう
に動作し「4」を印字する。そしてのタイミングで発
生するキャラクタパルスCPで印字バッファPBFの印
字データ「4」を印字終了を示す特定データ「F」に変
える。すなわち、印字を終了したデータ「4」はクリア
されたことになる。しかして、印字バッファPBFの印
字データは「F,F,F,F,C,F,5,6,7,
F,F」となる。以下、第10図の(j)、(i)、
(h)に示すように5桁目、4桁目、3桁目のハンマー
が順次動作してにそれぞれデータ「5」、「6」、
「7」が順次印字され、最終にキャラクタカウンタCH
CTと印字データ「C」の一致によって第10図の
(1)に示すように7桁目のハンマーが動作してデータ
「$」が印字され、のタイミングで発生するキャラク
タパルスCPによって印字バッファPBFの印字データ
は全て特定データ「F」となって印字は終了する。こう
してプリンタコントローラ9のCPU11は次の印字デ
ータの受信に待機するようになる。
For example, at the timing when the character counter CHCT is counting “B”, $ 4567 = “F, F, F, F, C, 4,5,6,7,
When the print data of "F, F" is received, this print data is stored in the print buffer PBF. At this time, "4" is set in the feed counter FCT as shown in FIG. Then, when the feed counter FCT becomes "3", the feed magnet is turned on and (g) in FIG.
When the character pulse CP is generated at the subsequent time, the print data “4” and the character counter CHCT “4” match each other. Therefore, the matched sixth digit hammer is shown in FIG. It operates as shown in (k) and prints "4". Then, the character pulse CP generated at that timing changes the print data “4” in the print buffer PBF to the specific data “F” indicating the end of printing. That is, the data "4" for which printing has been completed has been cleared. Then, the print data of the print buffer PBF is “F, F, F, F, C, F, 5, 6, 7,
F, F ". Hereinafter, (j), (i) of FIG.
As shown in (h), the 5th digit, 4th digit, and 3rd digit hammers sequentially operate to generate data "5", "6",
"7" is sequentially printed, and finally the character counter CH
When CT and the print data "C" match, the hammer of the seventh digit operates to print the data "$" as shown in (1) of FIG. 10, and the character pulse CP generated at the timing of the print buffer PBF. The print data of all becomes the specific data "F", and the printing ends. In this way, the CPU 11 of the printer controller 9 stands by to receive the next print data.

従って、印字データによっては印字ドラム21が1回転
する前に印字が終了する場合もあり、このような場合に
は従来のように常に印字バッファPBFの印字データを
印字して次の印字に待機するのに印字ドラム21が1回
転する時間を要するものに比べて印字動作が早く終了す
ることになる。従って、複数行印字するような場合には
各行における時間の短縮が加算されるので、従来に比べ
てかなりの印字スピードアップ化を図ることができる。
Therefore, depending on the print data, the print may be completed before the print drum 21 makes one rotation. In such a case, the print data in the print buffer PBF is always printed and waits for the next print as in the conventional case. However, the printing operation is completed earlier than the case where the printing drum 21 requires one rotation time. Therefore, in the case of printing a plurality of lines, the time reduction in each line is added, and the printing speed can be considerably increased as compared with the conventional case.

また、例えば印字データ「$4567」、すなわち
「F,F,F,F,C,4,5,6,7,F,F」の印
字において「4」の印字が終了し「5」の印字を行う前
に停電が発生するとこのときの印字バッファPBFの印
字データ「F,F,F,F,C,F,5,6,7,F,
F」及びフィードカウンタFCTの内容「0」がインタ
ーフェース8を介してCPU1に送出され、RAM3の
印字退避バッファ3に退避される。その後停電が回復
するとCPU1により印字退避バッファ3に退避され
ていた印字データ「F,F,F,F,C,F,5,6,
7,F,F」及びフィードカウンタFCTの内容「0」
が印字バッファPBF及びフィードカウンタFCTに戻
される。しかして、プリンタコントローラ9はこの印字
データに基づいてプリンタ機構16を制御して印字を行
うので、このとき印字されるデータは「5,6,7,
$」であって既に印字されている「4」については印字
しない。従って従来のようにデータ「4」が二重に印字
されるということはなく、データ「4」が見難くなる虞
れはない。換言すれば停電が発生した場合でも常に良好
な印字ができるものである。
Further, for example, in printing of print data "$ 4567", that is, "F, F, F, F, C, 4,5, 6, 7, F, F", printing of "4" is completed and printing of "5" is completed. If a power failure occurs before performing the above, the print data “F, F, F, F, C, F, 5, 6, 7, F,
F "and the contents of the feed counter FCT" 0 "is sent to CPU1 via the interface 8, it is saved in the print saving buffer 3 second RAM 3. Thereafter a power failure retreated once was print data "F to print saving buffer 3 2 by CPU1 Upon recovery, F, F, F, C , F, 5,6,
7, F, F ”and content of feed counter FCT“ 0 ”
Is returned to the print buffer PBF and the feed counter FCT. Since the printer controller 9 controls the printer mechanism 16 to perform printing based on the print data, the data printed at this time is "5, 6, 7,
"4" that is already printed is not printed. Therefore, unlike the conventional case, the data "4" is not printed twice, and there is no fear that the data "4" becomes difficult to see. In other words, good printing is always possible even when a power failure occurs.

なお、この実施例はこの発明の印字装置を電子キャッシ
ュレジスタに適用したものについて述べたが必ずしもこ
れに限定されるものではなく、各種電子機器に適用が可
能である。また、この実施例では印字ドラム方式のもの
について述べたが必ずしもこれに限定されるものでない
のは勿論である。
It should be noted that this embodiment has been described by applying the printing apparatus of the present invention to an electronic cash register, but the present invention is not necessarily limited to this, and can be applied to various electronic devices. Further, although the printing drum type is described in this embodiment, it is needless to say that the present invention is not limited to this.

[発明の効果] 以上詳述したようにこの発明によれば、印字のスピード
アップ化を図ることができる印字装置を提供できるもの
である。
[Effects of the Invention] As described in detail above, according to the present invention, it is possible to provide a printing apparatus capable of speeding up printing.

【図面の簡単な説明】[Brief description of drawings]

図はこの発明の実施例を示すもので、第1図はブロック
図、第2図はプリンタ機構の概略構成図、第3図は印字
ドラムの活字配列状態を示す展開図、第4図はメインR
AMの要部メモリ構成を示す図、第5図はプリンタコン
トローラのRAMの要部メモリ構成を示す図、第6図は
プリンタコントローラのCPUのメイン処理を示す流れ
図、第7図はプリンタコントローラのCPUのキャラク
タパルス入力割込み処理を示す流れ図、第8図はメイン
CPUの停電割込み処理を示す流れ図、第9図はメイン
CPUの停電復帰処理を示す流れ図、第10図はプリン
タコントローラの各部の制御タイミングを示すタイミン
グチャートである。 9…プリンタコントローラ、11…CPU(中央処理装
置)、12…ROM(リード・オンリー・メモリ)、1
3…RAM(ランダム・アクセス・メモリ)、16…プ
リンタ機構、3…印字退避バッファ、PBF…印字バ
ッファ。
FIG. 1 shows an embodiment of the present invention. FIG. 1 is a block diagram, FIG. 2 is a schematic configuration diagram of a printer mechanism, FIG. 3 is a development view showing a character arrangement state of a printing drum, and FIG. R
FIG. 5 is a diagram showing a main memory configuration of the AM, FIG. 5 is a diagram showing a main memory configuration of the RAM of the printer controller, FIG. 6 is a flowchart showing main processing of the CPU of the printer controller, and FIG. 7 is a CPU of the printer controller. 8 is a flowchart showing the character pulse input interrupt processing of FIG. 8, FIG. 8 is a flowchart showing the power failure interrupt processing of the main CPU, FIG. 9 is a flowchart showing the power failure recovery processing of the main CPU, and FIG. 10 is the control timing of each part of the printer controller. It is a timing chart shown. 9 ... Printer controller, 11 ... CPU (central processing unit), 12 ... ROM (read only memory), 1
3 ... RAM (random access memory), 16 ... printer mechanism, 3 2 ... print save buffer, PBF ... print buffer.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】活字に対応した印字データを1行分格納す
る印字バッファを備え、その印字バッファの各桁の印字
データに基づいてプリンタ機構を動作して1行の活字を
順次印字する印字装置において、前記印字バッファに対
して1行分の印字データを格納するとき印字データの無
い桁に特定データを付加して格納する手段と、前記印字
バッファの各印字データを印字する毎にその印字した印
字データを特定データに変更する手段と、前記印字バッ
ファの各桁がすべて特定データになったとき1行の印字
動作を停止制御する手段とを設けたことを特徴とする印
字装置。
1. A printing device comprising a print buffer for storing one line of print data corresponding to a print character, and operating a printer mechanism based on the print data of each digit of the print buffer to sequentially print one line of print data. In storing the print data for one line in the print buffer, a unit for adding specific data to a digit having no print data and storing the print data each time the print data in the print buffer is printed. A printing apparatus comprising: means for changing print data into specific data; and means for stopping and controlling the printing operation of one line when all the digits of the print buffer become the specific data.
JP24436285A 1985-10-31 1985-10-31 Printer Expired - Lifetime JPH064350B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24436285A JPH064350B2 (en) 1985-10-31 1985-10-31 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24436285A JPH064350B2 (en) 1985-10-31 1985-10-31 Printer

Publications (2)

Publication Number Publication Date
JPS62104783A JPS62104783A (en) 1987-05-15
JPH064350B2 true JPH064350B2 (en) 1994-01-19

Family

ID=17117562

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24436285A Expired - Lifetime JPH064350B2 (en) 1985-10-31 1985-10-31 Printer

Country Status (1)

Country Link
JP (1) JPH064350B2 (en)

Also Published As

Publication number Publication date
JPS62104783A (en) 1987-05-15

Similar Documents

Publication Publication Date Title
JPH064350B2 (en) Printer
JPS6043528B2 (en) electronic typewriter
US4627752A (en) Daisy wheel printing device with variable hammer delay
US5501534A (en) Electronic apparatus which is automatically initialized when normal operation is resumed after the apparatus has been in a low power consumption mode
JP2656954B2 (en) Printer print head control method
KR900003351B1 (en) High speed printing method for printer
JPH0696322B2 (en) Printer
JPS6359579A (en) Input processor
JP2877607B2 (en) Data output control method
JPS59112389A (en) Receipt printing system for electronic register
JPS62225373A (en) Line printer
JPH04319470A (en) Printer
JPS62158071A (en) Printer
JPS5849291A (en) Line printer with printing ratio computing function
JP2533148B2 (en) Electronic cash register
JPS584679Y2 (en) Dot printer dot needle drive power control circuit
JPS6150454U (en)
JPS62236778A (en) Printing control device of line printer
JPH1029351A (en) Ticket printer
JPH0338118B2 (en)
JPS61182970A (en) Controller for printer
JPS5816869A (en) Printer
JPH05278279A (en) Printer
JPS6317064A (en) Printer
JPS59127788A (en) Printer