Summary of the invention
Based on this, provide a kind of monitor printing method that can conveniently use and system that is applicable to multilingual printing.
A kind of monitor printing method is used for by printer with the data-printing of patient monitor out comprising the steps:
Data patient monitor carries out virtual printing paper cloth office and draw described patient monitor in internal memory obtain waveform graph;
Convert described waveform graph to printer data;
Described printer data is sent to the SPI interface of the thermal head of printer by SPI; And
Printer is printed by the speed of appointment.
The step of in one embodiment, carrying out virtual printing paper cloth office at patient monitor is: the size according to printing paper is carried out virtual printing paper cloth office at patient monitor.
In one embodiment, in the step of the data of the described patient monitor of drafting, the data of described patient monitor are patient report in internal memory.
In one embodiment, described waveform graph is converted in the step of printer data, the data of described waveform graph for depositing by the row order, described printer data is for pressing the vertical data of printing of row.
In one embodiment, described patient monitor is controlled the print speed of printer by the PWM mode.
In one embodiment, also be included in before the step of carrying out virtual printing paper cloth office on the patient monitor, obtain the step of the status information of printer.
A kind of patient monitor print system,, comprise
Patient monitor, the data that are used for carrying out virtual printing paper cloth office and draw described patient monitor at internal memory obtain waveform graph, then convert described waveform graph to printer data; And
Printer, for receiving described printer data and printing by the speed of appointment, described printer comprises thermal head, and described thermal head is provided with the SPI interface, and described patient monitor sends to described SPI interface by SPI communication with described printer data.
In one embodiment, described printer comprises printhead and motor, and described motor is directly controlled the print speed of described printhead, thereby described patient monitor is controlled the print speed that described motor is controlled described printhead by the PMW mode.
This monitor printing method, the data of the patient monitor that needs are printed are depicted as waveform graph, then convert this waveform graph to printer data, and by the mode of SPI printer data is sent to printer, thereby printer can have been beaten any literal and figure.This monitor printing method is applicable to multilingual printing, and can conveniently use.
The specific embodiment
For the ease of understanding the present invention, the below is described more fully the present invention with reference to relevant drawings.Provided preferred embodiment of the present invention in the accompanying drawing.But the present invention can realize with many different forms, be not limited to embodiment described herein.On the contrary, provide the purpose of these embodiment be make the understanding of disclosure of the present invention more comprehensively thorough.
The monitor printing method of an embodiment as shown in Figure 1 is used for by printer with the data-printing of patient monitor out comprising the steps:
S10, carry out virtual printing paper cloth office and the data of the patient monitor in internal memory, draw to need printed at patient monitor, obtain waveform graph.
In general, before carrying out this step, also comprise the step of the status information of obtaining printer.
The duty of sensor sensing printer that can be by printer, and then the data of the duty of the printer of sensing are detected analysis, thus obtain the status information of printer.Whether the printer modes information spinner will comprise whether printer turns round, whether printing paper is put into, print the storehouse and close etc.
Carrying out virtual printing paper cloth office at patient monitor is generally according to the size of printing paper and carries out virtual printing paper cloth office at patient monitor.
The data of patient monitor are generally patient's relevant information, for example can be patient report.
Obtaining waveform graph shows in video memory.
S20, the waveform graph that S10 is obtained convert printer data to.
The data of waveform graph for depositing by the row order, and printer data is for pressing the vertical data of printing of row.
Therefore, the waveform image in the internal memory of monitor need to be converted to the printer data that printer can be identified.
S30, the printer data that S20 is obtained send to the SPI interface of the thermal head of printer by SPI.
Serial Peripheral Interface (SPI) (SPI, Serial Peripheral Interface) is a kind of synchronous serial communication mode that motorola inc releases, a kind of four line locking buses, because of its hardware capability very strong, the software relevant with SPI is just quite simple, makes CPU have the more time to process other affairs.
The thermal head of printer is provided with the SPI interface, thereby can receive the printer data that S20 obtains by SPI.
S40, printer are printed by the speed of appointment.
Printer is printed according to the speed of appointment after receiving printer data.
In the present embodiment, print speed is controlled, and patient monitor is controlled the print speed of printer by the PWM mode.
Pulse width modulation (PWM, Pulse Width Modulation), being called for short pulsewidth modulation, is to utilize the numeral of microprocessor to export a kind of very effective technology that analog circuit is controlled, and is widely used in from many fields of measure, communicate by letter power control and conversion.
Concrete, printer comprises printhead and motor, motor is directly controlled the print speed of printhead, thus patient monitor is controlled the print speed of motor control printhead by the PMW mode.
This monitor printing method, the data of the patient monitor that needs are printed are depicted as waveform graph, then convert this waveform graph to printer data, and by the mode of SPI printer data is sent to printer, thereby printer can have been beaten any literal and figure.
This monitor printing method is applicable to multilingual printing, and can conveniently use.
SPI is the high-speed synchronous serial port, and transmitting-receiving is independent, can carry out synchronously, and greater than serial ports, this monitor printing method can be printed the meticulous report of high-resolution with the SPI communication efficiency.
The print logic work of this monitor printing method is simple, does not need the intercommunication agreement, does not need single-chip microcomputer, does not need to program, and is with low cost, safeguards simple.
The patient monitor print system of an embodiment as shown in Figure 2 comprisespatient monitor 10 andprinter 20.
The data thatpatient monitor 10 is used for carrying out virtual printing paper cloth office and drawspatient monitor 10 at internal memory obtain waveform graph, then convert waveform graph to printer data.
Printer 20 is used for receiving printer data and prints by the speed of appointment.
Printer 20 comprisesthermal head 22, andthermal head 22 is provided withSPI interface 24, and patient monitor sends toSPI interface 24 by SPI communication with printer data.
In the present embodiment,printer 20 also comprises printhead (not shown) andmotor 28, andmotor 28 is directly controlled the print speed of printhead, therebypatient monitor 10 is controlled the print speed ofmotor 28 control printheads by the PMW mode.
The above embodiment has only expressed one or more embodiments of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.